Wednesday, November 24, 2010

Disable ScheduledDefrag "Windows 7"

By default on Windows 7, Scheduled task for Defragmenting local HDDs is enabled to run Every Wednesday at 01:00 AM.  



You can disable this task using following command:

schtasks /change /tn "microsoft\windows\defrag\ScheduledDefrag" /disable

If you want to disable ScheduledDefrag to the Domain computers in your company then create a BAT file and include it as computer based GPO logon script.
After applying this GPO to the target computer run  taskschd.msc. The status of  ScheduledDefrag is disabled.

Monday, November 22, 2010

ADM Template to Disable Hibernation on Windows 7 via Group Policy

To disable Hibernation the HibernateEnabled registry key has to be 0 (zero) to the following registry path:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

Here is the ADM Template:
;------------------------------------------------------------------------------
CLASS MACHINE

CATEGORY !!System
CATEGORY !!PowerManagement
KEYNAME "CurrentControlSet\Control\Power"

POLICY !!Pol_Disable_Hibernation
EXPLAIN !!Explain_Disable_Hibernation

VALUENAME "HibernateEnabled"
VALUEON NUMERIC 0
VALUEOFF NUMERIC 1
END POLICY
END CATEGORY;
END CATEGORY;


[Strings]
System="System"
PowerManagement ="Power Management"

;------------------------------------------------------------------------------
; Options
;------------------------------------------------------------------------------
Options="Options"
Pol_Disable_Hibernation="Disable Hibernation on Windows 7"
Explain_Disable_Hibernation="Disable Hibernation on Windows 7"
;------------------------------------------------------------------------------

Save this text in file with ADM extension and import it to Windows Server 2008 GPO.

After applying this GPO and restarting the target computer, the hiberfil.sys file is deleted and Hibernate is removed from Windows 7 Start Menu.



Friday, November 19, 2010

ADM Template to Disable Sleep Buton on Windows 7 Start Menu via Group Policy

To disable the Sleep button onto the Windows 7 Start Menu, a registry key must be generated to the following location: HKLM\Software\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab

Generate the Dword "ACSettingIndex" and configure the value with the 0


Save the ADM template in file with ADM extension and import it in your GPO on Windows Server 2008:

CLASS MACHINE

CATEGORY !!System
CATEGORY !!PowerManagement
KEYNAME "Software\Policies\Microsoft\Power\PowerSettings\abfc2519-3608-4c2a-94ea-171b0ed546ab"

POLICY !!Pol_Disable_Sleep_Button
EXPLAIN !!Explain_Disable_Sleep_Button

VALUENAME "ACSettingIndex"
VALUEON NUMERIC 0
VALUEOFF NUMERIC 1
END POLICY
END CATEGORY;
END CATEGORY;
END CATEGORY;

[Strings]
System="System"
PowerManagement ="Power Management"

;------------------------------------------------------------------------------
; Options
;------------------------------------------------------------------------------
Options="Options"
Pol_Disable_Sleep_Button="Disable Sleep Button on Windows 7 Start Menu"
Explain_Disable_Sleep_Button="Disable Sleep Button on Windows 7 Start Menu"



After applying the GPO to the target computer the Sleep button is grayed out:

Thursday, November 18, 2010

Failure sending mail: The transport failed to connect to the server

When you configure SCCM Reporting services Subscription you get this error:

Failure sending mail: The transport failed to connect to the server



If your Exchange Server is configured to accept emails from SCCM server then you should configure or check your configuration in Reporting Services Configuration Manager. On left pane choose E-mail settings and after that on right pane enter user name and SMTP server.

Thursday, November 11, 2010

Capture image with ImageX

You want to create an WIM file from your Reference Windows machine. The reference machine is prepared with all necessary software and you sysprep this machine using:

sysprep.exe /generalize /oobe /shutdown /unattend:unattend.xml

Note: unattend.xml must exist in C:\Windows\System32\sysprep

To create a WIM file you need to boot in Windows PE mode and after that use Image.exe to capture the image and copy to network share, HDD or USB drive.

To boot from Windows PE you have to create Windows PE bootable USB drive:
http://tompopov.blogspot.com/2010/11/create-windows-pe-bootable-usb.html
After that, copy ImageX in the root of the USB drive.



ImageX is included in Windows AIK software. For Windows 7 you can download it from this site:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34&displaylang=en

There are different versions of ImageX which depend from computer architecture. For 64-bit machines ImageX is located in following folder:

C:\Program Files\Windows AIK\Tools\amd64



When your booting in Windows PE mode is done, press F8 to get command prompt.
By default CMD is redirected to X: drive.

In my case USB drive was F: drive. To execute ImageX command I switched to F drive and from there first I mapped network share using:

net use y: \\server\network_share\

After that to capture and to copy WIM file to network share I used:

F:\imagex.exe /capture c: y:\myimage.wim "Drive C" /compress fast /verify

C drive is currently the drive that was syspreped and that has to be captured and copied to network share.

Create Windows PE bootable USB

This can be done using SCCM 2007 R2 console. Right click on Task Sequence, choose Create Task Sequence Media:


Choose Bootable Media:

Choose USB Flash Drive:

Choose if you want to have support of Unknown computers, Protect Media with Password or Create Self-signed medias certificate or import existing one.

Choose Boot image, click Next and after that Finish.

Wednesday, November 10, 2010

Unable to sysprep the machine, hr=80004005

When you try to Capture Windows 7 using SCCM "Capturing Only" Task Sequence in C:\Windows\SysWOW64\CCM\Logs\SMSTSlog\smsts.log file you get these errors:

*******************************************
Sysprep did not complete successfully
Unable to sysprep the machine, hr=80004005
Sysprep'ing the machine failed, hr=80004005
*******************************************


This error can be caused by over sysprep-ing your reference machine.

Sysprep allows one machine to be sysreped 3 times.

How many times your machine is syspreped you can check out with this command:

slmgr.vbs /dlv


By default: Remaining Windows rearm count is 3.

To skip rearm process you can use this XML code that can be added to your unattend.xml file:

*settings pass="generalize">
*component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
*SkipRearm>1*/SkipRearm>
*/component>
*/settings>

Note: At the begin of each line replace "*" with "<"

Here is the MS article related to this issue: http://support.microsoft.com/kb/929828

Note

You must make sure that the "SkipRearm" setting is removed from the final unattended file that is used to deploy computers in a production environment. If is not removed from the unattended file that is used to deploy computers in a production environment, the KMS current client count does not increase for new clients that are added to the network.

Tuesday, November 2, 2010

Autodesk Crosswalk 5.1 deploying using SCCM

Autodesk Crosswalk 5.1 can be downloaded from this link:

http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=13525184&linkID=12544121

The software installer setup_Crosswalk_5.1_windows.exe cannot be deployed silently because does not support any silent switch ex: /s /q

To resolve the issue you should extract this exe file using Universal Extractor.

http://legroom.net/software/uniextract

WinZIP, WinRAR, 7zip cannot extract this exe file.

After that in the extracted folder you can find setup.exe file and you can use setup.exe /s command to deploy this software silently.




For Silent uninstall this command can be used:

setup.exe /uninstall /s

There is another uninstall string for Crosswalk:

C:\Program Files\Autodesk\Crosswalk5.1\Setup\setup.exe -runfromtemp -l0x0009 -removeonly