Search Results for get-ciminstance

Get Hyper-V guest serial number with PowerShell

PowerShell 5.0 logo

...-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 the above Get-WmiObject command is: elementname...

Enable NTFS long paths through GPO in Windows Server

Enable Win32 long paths through GPO in Windows Server

...} } # Windows 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...