Changed test from Get-Netadapter to CIM for v6

This commit is contained in:
jhoneill
2019-05-01 11:24:36 -07:00
parent b06e9e35b7
commit 899a8215e5

View File

@@ -91,12 +91,12 @@ Describe "Join Worksheet part 1" {
}
$path = "$env:TEMP\Test.xlsx"
Remove-item -Path $path -ErrorAction SilentlyContinue
#switched from WMI to CIM objects so test runs on V6
#switched to CIM objects so test runs on V6
Describe "Join Worksheet part 2" {
Get-CimInstance -ClassName win32_logicaldisk |
Get-CimInstance -ClassName win32_logicaldisk |
Select-Object -Property DeviceId,VolumeName, Size,Freespace |
Export-Excel -Path $path -WorkSheetname Volumes -NumberFormat "0,000"
Get-NetAdapter |
Get-CimInstance -Namespace root/StandardCimv2 -class MSFT_NetAdapter |
Select-Object -Property Name,InterfaceDescription,MacAddress,LinkSpeed |
Export-Excel -Path $path -WorkSheetname NetAdapters