我将PowerShell作为行政管理机构,并使用以下的编码线,为更新窗户开户。 罚款
Start-Process wusa.exe -ArgumentList C:Tempwindows10.0-kb5032189-x64_0a3b690ba3fa6cd69a2b0f989f273cfeadba745f.msu -verb runas
但是,现在,我正试图以某种方式利用这部法典,在遥远的电脑上操作档案。 窗户更新档案的名称和偏远个人电脑的确切位置相同。
I came up with this code below which first gets admin credentials and passes it to the the invoke-command. Then the invoke-command runs the Start-Process code.
$Username = username123
$Password = 84fWfghnsf&5Fh
$pass = ConvertTo-SecureString -AsPlainText $Password -Force
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass
Invoke-Command -ComputerName 8HPF31J7V6.domain.local -Credential $Cred -ScriptBlock {Start-Process wusa.exe -ArgumentList C:Tempwindows10.0-kb5032189-x64_0a3b690ba3fa6cd69a2b0f989f273cfeadba745f.msu -verb runas}
问题在于,当我这样做时,遥远的《刑法》没有发生。
I also don t get any errors when running
任何关于我做什么错误的想法,或除此以外的任何其他解决办法?