Get list of environmental variables during OSD

cscript get.vbs > vars

Set env = CreateObject(“Microsoft.SMS.TSEnvironment”)
For each v in env.GetVariables
   WScript.Echo v & ” = ” & env(v)
Next   

Batch file to ping a range of IP addresses

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

@ECHO Off
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

 

#

#www.sivarajan.com

#

#Ref: http://santhoshsivarajan.blogspot.com/2010/01/check-admin-share-using-poweshell.html

#

$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

}

#else{

# 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

https://blogs.technet.microsoft.com/odsupport/2010/08/11/how-to-check-the-activation-type-and-status-of-office-2010-installations/

 

 

SCCM SQL script to find users associated with computers

SELECT  GS.Name0,
GS.UserName0,
WS.LastHWScan,
GS.Domain0,
OS.Caption0,
SYS.SystemRole0
FROM
v_GS_COMPUTER_SYSTEM GS,
v_GS_OPERATING_SYSTEM OS,
v_GS_SYSTEM SYS,
v_GS_WORKSTATION_STATUS WS
WHERE
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’)

http://eskonr.com/2012/08/sccm-configmgr-report-find-computers-for-the-list-of-selected-users/

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

https://blogs.technet.microsoft.com/secguide/2018/01/18/issue-with-bitlockerdma-setting-in-windows-10-fall-creators-update-v1709/

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

More info here

https://support.microsoft.com/en-gb/help/4057300/devices-not-working-before-log-on-a-computer-running-windows-10-1709

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