Monday, 2 February 2015

How can I diskpart automated with script ?

 

Open Notepad add your diskpart commands

select disk 0

select partition 1

delete partition override

create partition primary size=100

select partition 1

format quick fs=ntfs override label="System Reserved" noerr

assign letter=S

active

select disk 0

select partition 2

delete partition override

create partition primary

select partition 2

format quick fs=ntfs override label="Windows" noerr

assign letter=C

exit

Save Notepad as diskpart.txt

diskpart.exe /s dispart.txt

Now in your SCCM console create sccm Package with commad line diskpart.exe /s diskpart.txt

Sunday, 1 February 2015

How to Delete Windows Account from Machine - Windows 7



Login to computer and  Right click My Computer and choose Properties

clip_image002

Click Advanced System Settings

clip_image004

In the User Profiles Section, click Settings

clip_image006

Click on the profile you wish to remove and choose Delete.

clip_image008

Next go to USER ACCOUNTS in Control Panel.

clip_image009

Next choose MANAGE USER ACCOUNTS.

clip_image011

From the list of “users for this computer” left click to highlight the account you wish to delete and left click REMOVE , then OK.

clip_image013

 

If issues persist, from the Registry Navigate to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.  Find and delete the SID and SID.BAK version of the registry key that corresponds to the clients profile that has become corrupt.

 

HOW TO Update the DEFAULT USER Registry Hive’s Environment Variables TEMP and TMP.

HOW TO Update the DEFAULT USER Registry Hive’s Environment Variables TEMP and TMP.

  1.  
    clip_image004

    Launch REGEDT32.  (START à REGEDT32 à OK)
  2.  
    clip_image007

    Click (to select) HKEY_USERS.
  3.  
    clip_image010

    Click FILE, then Load Hive…
  4.  
    clip_image013

    Type C:\Documents and Settings\Default User in File Name, then click Open.
  5.  
    clip_image016

    Click (to select) NTUSERS.DAT, then click Open.
  6. Enter a desired Key Name then click OK. 

(It doesn’t really matter what you type, as long as you know what it is.)

 

  1.  
    clip_image019

    Click the + (to expand) beside HKEY_USERS.
  2. clip_image023

    Click the + (to expand) beside the Key Name you typed in Step #6, above.
  3.  
    clip_image027

    Click (to select) Environment.
  4. Change the TEMP and TMP values to be C:\Temp.
  5.  
    clip_image031

    Click (to select) the Key Name you typed in Step #6, above.
  6. clip_image033

     Click FILE, then Unload Hive…

 

13. Close REGEDT32.

 

Delete Group Policies Manually from a Client system


Manually clear the group policy from the workstation device by following these steps:

1. Delete C:\Windows\security\database\secedit.sdb

2. Delete all files and folders in C:\ProgramData\Microsoft\Group Policy\History\

3. Open a command prompt and run: gpupdate /force

4. Reboot device

Once rebooted open Trace32 with admin account and connect to the PolicyAgent.log file under c:\windows\system32\ccm\logs – you should see all policies downloading. Also connect to the machine using SCCM Client Center and confirm that advertisements have downloaded correctly.

If the above does not work then you need to remove and reinstall the SCCM agent after a reboot.

Repairing WMI on SCCM Client system

Follow below steps if the SCCM client on a device is not communicating correctly with the SCCM Management Point and in turn not downloading policies/advertisements etc.

  1. WMI Repair:

·         Log into PC with an account with elevated rights.

·         Stop the WMI Service:

o   Open “Computer Management” by right clicking on “My Computer” and selecting “Manage”  or go to Start - Settings - Control Panel, select “Administrative Tools”  and then left click “Computer Management”.

o   Once open, expand “Services and Applications” and select “Service”. 

o   In the right-hand window, scroll down to the “Windows Management Instrumentation and stop this service.

 

clip_image002

 

·         To re-register the WMI components, run the following commands at the command prompt:

·         Type cd /d %windir%\system32\wbem and then press ENTER.

·         Type for %i in (*.dll) do RegSvr32 -s %i, and then press ENTER.

·         Type for %i in (*.exe) do %i /RegServer, and then press ENTER.

·         The Windows Management Instrumentation Tester tool will appear; just close this and continue on.

·         Log off and back on again, stop the WMI Service once more.

·         Using Windows Explorer, rename the folder %windir%\System32\Wbem\Repository to  %windir%\System32\Wbem\Repository_old

·         Re-start computer to start the Windows Management Instrumentation Service and any other depended services that may have stopped.

 

PROBLEM - VM Citrix Desktop Agent failing to communicate with Citrix DDC

If there is an error in the VM application log as shown below, this indicates there is a problem with the installation of the VDA agent.

 

Event Type:     Error

Event Source:  Citrix Desktop Service

Event Category:          None

Event ID:         1217

Date:               07/10/2011

Time:               11:14:08

User:               N/A

Computer:       VM NAME

Description:

The Citrix Desktop Service failed to obtain a list of delivery controllers with which to register.

 

Please ensure that the Active Directory configuration for the farm is correct, that this machine is in the appropriate Active Directory domain and that one or more delivery controllers have been fully initialized.

 

 

RESOLUTION

In this case the VDA agent on the VM will need to be uninstalled and then reinstalled.
Connect to the VM either by RDP or through the Xen console and login with your w- account.
Open up Add/Remove Programs
Highlight “Citrix Virtual Desktop Agent”, select Remove and reboot when uninstall complete.
Connect to the VM either by RDP or through the Xen console and login with your w- account.
Reinstall the latest Citrix Virtual Desktop Agent.  For WIN7 this can be installed from the SCCM Deployment Console. 

SCCM Failing to Install Error 1904 - Resolution

This resolution applies to any machine (VM or Desktop) where SCCM is failing to install and which is getting the following Application event log entry:
Description:

Product: Configuration Manager Client -- Error 1904. Module C:\WINDOWS\system32\CCM\VAppRegHandler.dll failed to register. HRESULT -2147221164.
This is caused by the atl.dll which has not been registered correctly on the machine.
To fix this error follow the steps below:

1. Log onto affected machine
2. Uninstall SCCM from the machine if already installed. To do this open up a command prompt and navigate to c:\windows\system32\ccmsetup and run ccmsetup /uninstall
3. Once uninstall compete open up a command prompt and run regsvr32 atl.dll
4. Install SCCM Configuration Manager
5. Check if SCCM Companion is installed – if not then install that also
6. Reboot machine
7. Confirm machine has SCCM installed

Resolving hanging Internet Explorer 7 on VDI XP Virtual Machines

 

PROBLEM:

VM clients with IE7 can have the problem where IE hangs on their VM’s and the only resolution is to end the process through Task Manager.

RESOLUTION:

The solution is to ensure that both the launchpad and Virtual Machine that the client is working on have the same version of Citrix Online Plugin. Tests show that a client who has Citrix Online Plugin 11.2 installed on both the launchpad and VM removes the problem. Software can be upgrade no problem and an uninstall/reinstall is not necessary.

Security Configuration Manager in Windows 2008 R2


Security Configuration Manager is an attack surface reduction tool for Windows Server 2008 SP2.  It determines the minimum functionality required for a server’s role, and disables functionality that is not required.  SCW does the following:

 

·            Disables unneeded services

·            Blocks unused ports

·            Allows further address or security restrictions for ports that are left open

·            Prohibits unnecessary IIS web extensions, if applicable

·            Reduces protocol exposure to server message block (SMB), LanMan, and Lightweight Directory Access Protocol (LDAP)

 

NOTE: When using this procedure you must be aware that different options within ‘Security Configuration Manager’ will be required depending on the type of server you are building.  This procedure details the configuration for the OCS EDGE servers only.

 

·            To harden the server, the Security Configuration Wizard (SCW) needs to be run which allows you to create a security policy to be applied.

 

·            Logon to the OCS EDGE server with the local admin account and launch Security Configuration Wizard via Administration Tools.

 

clip_image002

 

·         Select Next (click OK on the Access denied prompt)

 

clip_image004

 

 

 

·         Select Create a new security policy and Next

 

clip_image006

 

 

 

·         Add the server name you are applying the Security policy to and click Next.

 

clip_image008

 

·         Next of the resulting screen.

 

clip_image010

·         Next again.

 

clip_image012

 

·         Ensure the following installed roles are selected and click Next.

 

clip_image014

 

clip_image016

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

·         Ensure the following installed features are selected and click Next.

 

clip_image018

 

clip_image020

 

·         Ensure the following installed options are selected and click Next.

 

 

clip_image022

 

clip_image024

 

 

clip_image026

 

clip_image028

 

·         Ensure the following additional services are selected and click Next

 

clip_image030

 

clip_image032

 

clip_image034

 

 

 

 

 

 

·         Take the default option handling unspecified services and click Next.

 

clip_image036

 

·         Review the following services as per the screenshots.  (DNS client is now enabled so will not appear)

 

 

 

 

clip_image038

 

clip_image040

 

clip_image042

 

clip_image044

 

clip_image046

 

 

clip_image048

 

 

clip_image050

 

·         Select Skip this section and Next.

 

clip_image052

 

·         On Registry setting click Next.

 

clip_image054

 

·         Deselect - It has surplus processor capacity etc and click Next.

 

clip_image056

 

 

·         Select Local Accounts on the remote computers option in addition to Domain Accounts and click Next.

clip_image058

·         Take the default option on the next four screens and click Next four times.

 

clip_image060

 

 

clip_image062

 

clip_image064

 

 

clip_image066

 

·         Select Audit successful and unsuccessful activities and click Next.

 

clip_image068

 

 

·         Deselect the option to include the SCWAudit.inf security template and click Next.

 

clip_image070

·         Click Next to save the policy.

 

clip_image072

·         Create the policy name OCS_Edge_SCW and click Next.

 

clip_image074

·         Click apply now and Next.

 

clip_image076

·         Click Next once the policy has been applied

 

clip_image078

 

·         Click Finish.

 

clip_image080