tools: add wmi monitor info powershell script

This commit is contained in:
yuyoyuppe
2020-09-07 12:55:30 +03:00
committed by Andrey Nekrasov
parent 3c76942799
commit e0d6c2a4cd

View File

@@ -0,0 +1,6 @@
$output = gwmi WmiMonitorID -Namespace root\wmi | ForEach-Object { ($_.UserFriendlyName -notmatch 0 | foreach {[char]$_}) -join ""; ($_.SerialNumberID -notmatch 0 | foreach {[char]$_}) -join ""; $_.InstanceName + "`n" } | Out-String
Write-Host $output
$LogTime = Get-Date -Format "MM-dd-yyyy_hh-mm-ss"
$LogFile = 'wmi_monitor_info-' + $LogTime + ".log"
Write-Output $output | Out-File $LogFile