Uncheck “Allow the computer to turn off this device to save power” box

By | December 1, 2016
Share

To adjust this via a script, you must first determine the GUID and Class of the device, and then change the “PnPCapabilities to 280.

Reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007" /v "PnPCapabilities" /t REG_DWORD /d "280" /f

turnoffallowpowersaveforlan

/BG

Display the WIM filename during Image Apply step Dynamically

By | November 30, 2016
Share

Since there is no MDT built-in variable assigned with just the wim name, i had to create a seperate step to create the variable “OSDImageName”, which i  then used in my standard image apply step.

osdnameduringtasksequence

Here is what the Task Sequence looks like:

Step Name Text:
Expanding %OSDImageName% (%ImageSize%) to %OSDisk%\…

usingosdimagename

And here is how I create the OSDImageName variable.

cmd /c echo Set objShell=WScript.CreateObject("Wscript.Shell"):objShell.run "cscript.exe //nologo ""%SCRIPTROOT%\ZTISetVariable.wsf"" /VariableName:OSDImageName /VariableValue:"""^&Split(Mid("%InstallFromPath%",Len("%SourcePath%")),"\")(1)^&"""" > %temp%\test.vbs,1,True && wscript //nologo %temp%\test.vbs

populatingosdimagename

/BG

SMSTS log file should be copied at end of EVERY MDT Task Sequence!

By | November 29, 2016
Share

smsts-log-location

MDT has a fairly large shot coming. It doesn’t copy one of the best log files that is used to troubleshoot Task Sequence issues, smsts.log.  I hunted down the log file and now copy it using a custom step at the end of all of my Task Sequences.

smstslog-copy-step

/BG

 

My First Chocolately Package [Approved] – BatteryBar

By | October 25, 2016
Share

2016-10-25_12-55-31

https://chocolatey.org/packages/BatteryBar

Chocolately is like apt-get, but for Windows.  My favorite thing about chocately is having the ability to reach out and update all of my packages with one command line “choco upgrade all”!  Making the package took a bit of trial and error, but it was easy enough.  It uses Powershell at it’s base and has an excellent package library and community.  I only wish I found it earlier in my IT career!

I eventually will figure out a way to use these packages to my advantage within the MDT/SCCM world.  That or learn PowerShell DSC (Desired State Configuration) already.

-BG

Add MDT Selection Profiles for each Out-of-Box Driver Folder using a PowerShell Script

By | October 23, 2016
Share

MDT Task Sequence’s Inject driver steps do not support specifying folders,  so Selection Profiles are the defacto method for bridging this gap.  Here is a script I created to ease the process of creating/importing multiple system drivers into MDT at once.  If ran more than once, it will not create duplicate selection profile entries.


2016-10-23_15-51-24

/BG