Advertisement
Lee_Dailey

SysInfo - SoundDevice

Jun 4th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # SysInfo - SoundDevice
  2.  
  3. $SystemInfo = [ordered]@{}
  4.  
  5. $CIM_SoundDevice = @(Get-CimInstance -ClassName Win32_SoundDevice)
  6.  
  7. foreach ($CSD_Item in $CIM_SoundDevice)
  8.     {
  9.     $Index = '{0:D2}' -f $CIM_SoundDevice.IndexOf($CSD_Item)
  10.     $SystemInfo.Add("Sound_${Index}_Name", $CSD_Item.Name)
  11.     $SystemInfo.Add("Sound_${Index}_Manufacturer", $CSD_Item.Manufacturer)
  12.     $SystemInfo.Add("Sound_${Index}_Status", $CSD_Item.Status)
  13.     }
  14.  
  15. $SystemInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement