Search Results for get-ciminstance

Get Hyper-V guest serial number with PowerShell

PowerShell 5.0 logo

...VMs: Get-WmiObject -ComputerName hyper-v_host -Namespace root\virtualization\v2 -class Msvm_VirtualSystemSettingData | select elementname, BIOSSerialNumber Or use Get-CimInstance: Get-CimInstance -ComputerName hyper-v_host -Namespace root\virtualization\v2 -class Msvm_VirtualSystemSettingData | select elementname, BIOSSerialNumber The output is of...

Monitor website performance in IIS with Zabbix

Zabbix logo

...= (Get-CimInstance -EA SilentlyContinue -Query "select * from Win32_PerfRawData_W3SVC_WebService" -Namespace root\cimv2).Name # Get all Win32_PerfRawData_W3SVC_WebService properties for all websites $allwebsiteinfo = Get-CimInstance -EA SilentlyContinue -Query "select * from Win32_PerfRawData_W3SVC_WebService" -Namespace...

Enable NTFS long paths through GPO in Windows Server

Enable Win32 long paths through GPO in Windows Server

...Server 2016 build is 10.0.14393 [version]"10.0.14393" [version] $winver = $(Get-CimInstance -Namespace root\cimv2 -Query "SELECT Version FROM Win32_OperatingSystem").Version if($winver -ge [version]"10.0.14393") { if ($(Test-RegistryValue "HKLM:System\CurrentControlSet\Control\FileSystem" LongPathsEnabled) -eq $false) { New-ItemProperty -Path...