Each Windows operating system has a description, and you can view (and change) this description with the following command:

 
PS> control sysdm.cpl
 

To do the same in an automated way via PowerShell, use this:

# change operating system description
# (requires admin privileges)
$values = @{
    Description = 'My Computer'
}
Set-CimInstance -Query 'Select * from Win32_OperatingSystem' -Property $values

# read description
# (no admin privileges required)
$description = Get-CimInstance -ClassName Win32_OperatingSystem | 
  Select-Object -ExpandProperty Description

"OS Description: $description"




Twitter This Tip! ReTweet this Tip!

Anonymous