mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Changed test from Get-Netadapter to CIM for v6
This commit is contained in:
@@ -91,12 +91,12 @@ Describe "Join Worksheet part 1" {
|
|||||||
}
|
}
|
||||||
$path = "$env:TEMP\Test.xlsx"
|
$path = "$env:TEMP\Test.xlsx"
|
||||||
Remove-item -Path $path -ErrorAction SilentlyContinue
|
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" {
|
Describe "Join Worksheet part 2" {
|
||||||
Get-CimInstance -ClassName win32_logicaldisk |
|
Get-CimInstance -ClassName win32_logicaldisk |
|
||||||
Select-Object -Property DeviceId,VolumeName, Size,Freespace |
|
Select-Object -Property DeviceId,VolumeName, Size,Freespace |
|
||||||
Export-Excel -Path $path -WorkSheetname Volumes -NumberFormat "0,000"
|
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 |
|
Select-Object -Property Name,InterfaceDescription,MacAddress,LinkSpeed |
|
||||||
Export-Excel -Path $path -WorkSheetname NetAdapters
|
Export-Excel -Path $path -WorkSheetname NetAdapters
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user