繁体   English   中英

以提升的权限执行远程32位PSSession

[英]Execute a Remote 32 Bit PSSession with elevated rights

因此,我正在尝试获取一个脚本,以便从另一台服务器上的服务器远程运行脚本。 由于有cmdlet,此会话必须为32位。 并且该脚本必须以admin身份运行。 我已经试过了:

Invoke-Command -ComputerName isg108-81 -FilePath C:\inetpub\scrip\ConvertAppvPackages.ps1 -ConfigurationName microsoft.powershell32 -credentials Admin

因此,这将启动Powershell的32位版本,但是一旦脚本到达需要提升权限的部分,Shell就会告诉我:

You must run this cmdlet using a Windows PowerShell elevated command prompt . To run
an elevated command prompt, right-click the Windows PowerShell or Command Prompt Start
menu object that you are using to start your Windows PowerShell sessions, and then 
Select Run as administrator.

有人有想法吗?

非常感谢您的帮助!

如果服务器是64位操作系统,则必须调用32位powershell.exe。 如果调用服务器运行32 exe并运行脚本怎么办? 自从您调用它以来,该程序将不会显示,并且脚本必须输出一些文件才能查看任何结果。

因此,事实证明ConverFrom-AppvLeagcyPackage cmdlet某种程度上已损坏,无法远程执行。 作为解决方案,我使用程序Psexec远程运行脚本,尽管仅当您以系统用户身份运行脚本时,该脚本才有效。

多谢您的帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM