Prevent Windows 7 from sleeping: Task Sequence Step

August 26, 2010 Leave a comment

So we can perform some work at night after the migration, we needed to block 7 from sleeping (Which is its default setting). To do this, we tell the task sequence to set the active power state as High Performance using the powercfg tool. You can always fix this down the road for energy conservation, but that’s what we’re all waiting on R3 for, right?

powercfg.exe -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Where the present GUID is the GUID of the power state. In this case, that is the High Performance power state.

Windows 7: Wallpaper via Group Policy

August 26, 2010 Leave a comment

See: http://support.microsoft.com/kb/977944

To fix this, I downloaded the hotfix and created a package in SCCM then linked that package into our task sequences. Command line option for install via task sequence (for the program within your hotfix package):

wusa.exe Windows6.1-KB977944-x86.msu /quiet /norestart

I also have a reboot task sequence step right after this. The reason to block the update’s reboot and create your own is so that the TS will resume upon reboot and continue with your deployment.

Associate File Extension During Task Sequence

August 26, 2010 Leave a comment

We have to deploy 7-Zip in our org for a third-party storage system that works in mysterious ways with IE. As we deploy Windows 7, we need to make sure to automate as much as possible.. That includes making 7-Zip the default program for .zip files

Here is how I did it (in two task sequence steps for discernability):

1) Run Command Line > assoc .zip=7-Zip.zip
2) Run Command Line > ftype 7-Zip.zip=C:\progra~1\7-Zip\7zFM.exe

We are deploying x86 so we don’t have to worry about the Program Files issues, but if you are, 7-Zip has a 64-bit MSI and you just need to make your path point to the correct spot (IIRC, you will want progra~2 for x64, or you could just spell it out but we don’t do easy around here, dangit).

Activate Windows 7 during Task Sequence

July 29, 2010 Leave a comment

In the Apply Windows Settings task sequence step, it allows you to put in your MAK, but it doesn’t give you any choices for activation. If you create a new task sequence command line step (General > Run Command Line), you can enter this in at the end. I make it the last thing the task sequence does for good measure.

Run in: C:\Windows\System32
Command line: cscript.exe c:\windows\system32\slmgr.vbs /ato

Windows 7, Server 2008 R2 SP1

July 12, 2010 Leave a comment

Public beta now available: Here

Deploying APP-V Client

July 5, 2010 Leave a comment

As we migrate to Windows 7, we are deploying the APP-V client at the same time for future plans to move closer and closer to a VDI.

SWIFSDRIVE is the drive letter you want to make as your APP-V local cache drive. Make sure this does not conflict with any mapped network drives or any local drive letters.

You can also control this through Group Policy by importing the APP-V ADM template.

This also applies to the TS client.

setup.exe /s /v"/quiet /norestart /qn"0\"\" SWIFSDRIVE="L"

Limiting OSD Task Sequence to Laptops

July 5, 2010 Leave a comment

We have a piece of software (Colligo, hopefully SharePoint Workspace 2010 will replace this) that we deploy but only to laptops. So, during our task sequence, we need to make sure that we deploy this to only our Dell Latitudes.

1) In your task sequence, find the step you wish to limit.
2) Go into the Options tab.
3) Under Add Condition choose Query WMI
4) Namespace is root\cimv2
5) Query is SELECT * FROM Win32_ComputerSystem WHERE Model LIKE '%latitude%'

Managing Windows Internal Database MICROSOFT##SSEE

July 5, 2010 Leave a comment

Old, but good. We, of course, have WSUS installed on our secondary site servers that act as SUP’s. We have one that likes to freak out constantly and fail to connect to SUSDB on the local server. If you ever need to connect into the WID to check permissions, etc, do this:

1) Download SQL Server Management Studio Express
2) When you launch the console, connect to \\.\pipe\mssql$microsoft##ssee\sql\query (You do not need to specify SERVER\INSTANCE, just copy that in and connect).

Excluding a collection

July 4, 2010 Leave a comment

True-Up time! Sucks, right? That’s when you find out all of your reports from last year are useless because you have new products, new exclusions, new additions. Fun.

This is how you can exclude a collection from your True-Up results. In our case, we have many affiliate companies and one of them, being a Microsoft partner, performs their own True-Up. As such, we do not report them to our Microsoft reps. All machines belonging to that company are placed into their own collections and excluded. My example finds all 2008 Enterprise servers not in that affiliate’s collection.

SELECT distinct
SYS.Netbios_Name0,
SYS.AD_Site_Name0,
OS.Caption0
FROM
v_R_System SYS
INNER JOIN
v_GS_OPERATING_SYSTEM OS
ON
SYS.ResourceID = OS.ResourceID
WHERE
SYS.ResourceID NOT IN
(SELECT
ResourceID
FROM
v_FullCollectionMembership FCM
WHERE
(CollectionID = 'XXX000a6'))
AND
OS.Caption0 LIKE '%2008%enterprise%'

My Documents Folder Size

July 4, 2010 Leave a comment

We are implementing My Docs folder redirection on our network (finally) and we needed to know how much space we needed to reserve on the Celerra drive stacks. This pulls information per site (in our case, per AD site). We also excluded PST files. From this report, you can really customize that any way you want. Ready for a big freaking number?

Select DISTINCT
COUNT(SF.FileName) AS 'Count',
SUM(SF.FileSize) AS 'Total Size',
AVG(SF.FileSize) AS 'Average File Size'
from
v_GS_SoftwareFile SF
join
v_R_System SYS
on
SF.ResourceID = SYS.ResourceID
WHERE
SF.FilePath LIKE '%documents%'
AND
SF.FileName NOT LIKE '%.pst'
AND
SYS.AD_Site_Name0 = 'HolyCrapUSA'