PowerShell

echo off 
copy \\192.168.143.211\juanpi\123.ps1 c:\123.ps1
powershell set-executionpolicy remotesigned -force
powershell c:\123.ps1
@pause
del c:\123.ps1



set-executionpolicy remotesigned -force
$user=hostname
Get-WmiObject -Class Win32_Product | Select-Object -Property Name >>\\192.168.143.211\juanpi\$user.txt

猜你喜欢

转载自jis117.iteye.com/blog/2272245