Get list of environmental variables during OSD

During Configuration Manager OSD, F8 to access command prompt (presuming this is enabled in the boot media) and create get.vbs as below then run cscript get.vbs > vars

Use notepad.exe vars to view these during Win PE / OSD

Also see here

Dim env, v
Set env = CreateObject("Microsoft.SMS.TSEnvironment") 
For each v in env.GetVariables 
   WScript.Echo v & " = " & env(v) 

Batch file to ping a range of IP addresses

Batch Script to Ping a Range of IP Addresses to Identify Active Computers

set startTime=%time%
ECHO Starting the IP Scan
FOR /L %%i IN (1,1,2) DO @(
ECHO Pinging IP Range: 192.168.%%i._
FOR /L %%z IN (1,1,10) DO @(
echo Pinging IP: 192.168.%%i.%%z
ping -n 1 -w 500 192.168.%%i.%%z | FIND /i “Reply”>>IPScanResults.txt
ECHO Run Time = %startTime% to %time%>>IPScanResults.txt
ECHO *** IP Scan Complete. ***
ECHO Check the file called IPScanResults.txt to see the results
ECHO Run Time = %startTime% to %time%

PowerShell Script to poll a list of computers to find any with open admin$ shares






$ComputerFile = New-Item -type file -force “c:\scripts\Success_Computers.txt”

$FailedComputerFile = New-Item -type file -force “c:\scripts\Failed_Computers.txt”

#write-host -fore Blue “`t———————————————”

for ( ; ; ) {

Import-CSV c:\scripts\computers.txt | % {

$Computer = $_.ComputerName

$adminpath = Test-Path \\$Computer\admin$

If ($adminpath -eq “TRUE”){

write-host -fore Green “`tAdmin$ Success`t`t” $Computer “`t”

Add-Content $ComputerFile $Computer



# write-host -fore Red “`tAdmin$ Failed`t`t” $Computer “`t”

# Add-Content $FailedComputerFile $Computer}

# write-host -fore Blue “`t———————————————“


Start-Sleep -s 300



How to check the activation type and status of Office

  1. Open an administrative level command prompt.
    1. Navigate to the Office14 folder:
    2. 32bit Office on 64bit OS – “cd \Program Files (x86)\Microsoft Office\Office14”
  • 32bit Office on 32bit OS and 64bit Office on 64bit OS – “cd \Program Files\Microsoft Office\Office14”
  1. Execute “cscript ospp.vbs /dstatus”
  2. Look at “LICENSE NAME” for license type and “LICENSE STATUS” for activation status



SCCM SQL script to find users associated with computers

GS.ResourceID = SYS.ResourceID
AND WS.ResourceID = GS.ResourceID
AND OS.ResourceID = GS.ResourceID
AND SYS.SystemRole0<>’Server’
AND Datediff(dd,WS.LastHWScan,getdate()) > -1 and
GS.username0 in (‘DOMAIN\user1′,’DOMAIN\user2′,’DOMAIN\user3’)

Laptop dead after 1709 upgrade

I have had to avoid deploying 1709 mainly due to the fact that it was bricking all physical devices HP 725/745/612/X360 and rendering them dead halfway through the upgrade with no ability to rollback. This was back in October when we started to test this and the only virtual machines could be upgraded.

It was only recently that I found an article pointing a finger at a new setting in the latest baselines

After changing this to “disabled” upgrades to 1709 now work.

More info here

Baselines modified for RS2/RS3 as below.

MSFT Windows 10 RS2 – Computer

Computer Configuration | Policies | Administrative Templates | Windows Components | BitLocker Drive Encryption = Disabled

MSFT Windows 10 RS3 – BitLocker

Computer Configuration | Policies | Administrative Templates | Windows Components | BitLocker Drive Encryption = Disabled

How to deploy a Windows Image on UEFI-based Computers

Various errors including:

Unable to find a raw disk that could be partitioned as a system disk
failed to validate for boot image staging
stagebootimagefailed 8007000f

The efi partition on a efi system must be fat32

Failed to prepare the system partition for staging
the request is not supported

Trick is you must disable Secureboot and create UEFI partitions yourself. Just turn Secureboot off in properties and when ConfigMgr boot media is started press F8 and create partitions yourself.
•Select disk 0 (0 being the disk to setup)
•Clean (wipe the disk)
•Convert gpt (convert disk to GPT)
•Create partition efi size=200 (EFI system partition)
•Assign letter=s (Any allowable letter)
•Format quick fs=FAT32 (Format the ESP)
•Create partition msr size=128 (Create the MSR partition)
•Create partition primary (Create Windows partition)
•Assign letter=c
•Format quick fs=NTFS (Format primary partition)