- Messages
- 321
- Solutions
- 4
- Reaction score
- 58
- Points
- 28
Jan 2020 we got some servers from customer side for patching , It was around 600+ servers . We have created separate SUG and pushed to servers . But what happened next ? , we are getting alerting as other servers are getting rebooted which was not belongs to patching schedule . So we have started digging one by one from ground. So we came to know that some servers are having same GUID that is the reason unscheduled servers are getting patched. So that time we have created one PS script to find the GUID of the Clients
What is UUID ?
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used, typically in software created by Microsoft.
Script
This script will check the UUID of the client and append to UUID.csv . Save the below PS in one folder and create one notepad "Servers.txt" , here we can add Clients

OutPut in UUID.csv

What is UUID ?
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used, typically in software created by Microsoft.
Script
This script will check the UUID of the client and append to UUID.csv . Save the below PS in one folder and create one notepad "Servers.txt" , here we can add Clients
Code:
#script direction and input details
$ScriptDir = Split-Path $Script:MyInvocation.MyCommand.Path
$Servers = Get-Content $ScriptDir"\servers.txt"
#getting GUID and appending to UUID.csv
Foreach ($Server in $Servers)
{
Get-WmiObject -ComputerName $Server -Namespace root\CCM -Class CCM_Client | Select PSComputerName, ClientID |Export-Csv "$scriptDir\UUID.csv" -Append -NoTypeInformation
}
OutPut in UUID.csv
Last edited: