SCCM
-
Install Windows Updates on remote machine
Use this script to install all available windows update on a remote machine <# .SYNOPSIS This script will automatically…
Read More » -
Get-hotfix -asJob Remote machine
use this script to get hotfix details from remote machine as -asJob #$servers = ('chn6vmdp01', 'ca7vmdp01', 'gbr2vmdp01') $servers =…
Read More » -
install module on remote machine
use this script to install powershell module on remote machine $s = 'server1' [Net.ServicePointManager]::SecurityProtocol += [Net.SecurityProtocolType]::Tls12 Enter-PSSession -ComputerName $c invoke-command…
Read More » -
get patch installed as background job
$servers = Get-Content -Path "C:\servers.txt" foreach($comp in $servers){ $pingtest = Test-Connection -ComputerName $comp -Quiet -Count 1 -ErrorAction SilentlyContinue if($pingtest){ Write-Host($comp…
Read More » -
Background job – examples
Use background job to run multiple script same time in background without waiting for session to complete $computer = @('server1',…
Read More » -
check Single Patch KB ID installed on Remote Machine
Use this script to check if a single patch kb id installed on remote server use single line of command…
Read More » -
Check Patches Installed and send email
$RemoteComputers = get-content "C:\test\dpservers.txt" ForEach ($Computer in $RemoteComputers) { Try { Invoke-Command -Computername $Computer -ScriptBlock { $head=@” <style> @charset “UTF-8”;…
Read More » -
Clean SCCM Primary Site IIS Logs
$logs = Get-ChildItem -Path C:\inetpub\logs -Recurse -Filter *.log $oldest = (get-date).AddDays(-30) foreach($log in $logs){ if($log.LastWriteTime -lt $oldest){ $log.Delete() } }…
Read More » -
sccm client boundary group validation
Use this script to find remote machines sccm client has associate to any boundary group $dpservers = Get-Content "C:\test\dpservers.txt" foreach($dp…
Read More » -
Get Pending Reboot – remote machine
Use following scripts to find status of remote machine pending reboot Function Get-PendingRebootStatus { [CmdletBinding()] Param ( [Parameter( Mandatory =…
Read More »