简体   繁体   English

如何访问IIS:通过Powershell在远程计算机上驱动?

[英]How to access IIS: drive on remote machine via Powershell?

PS C:\WINDOWS\system32> Invoke-Command -ComputerName "UABEP1" -ScriptBlock { Get-ChildItem -Path IIS:\AppPools }

Cannot find drive. A drive with the name 'IIS' does not exist.
    + CategoryInfo          : ObjectNotFound: (IIS:String) [Get-ChildItem], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
    + PSComputerName        : UABEP1

Running the command locally on the remote machine returns the list of app pools. 在远程计算机上本地运行该命令将返回应用程序池列表。 Is there a security setting that must be changed? 是否有必须更改的安全设置?

您忘记加载WebAdministration模块:

{ Import-Module WebAdministration; Get-ChildItem -Path IIS:\AppPools }

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

相关问题 在Powershell中映射远程计算机上的驱动器 - Mapping drive on a remote machine in powershell 使用Powershell在远程计算机上重新启动IIS - Restart IIS on remote machine using Powershell 如何通过ansible将本地powershell脚本运行到远程机器上? - How to run a local powershell script into remote machine via ansible? 如何通过Powershell从远程计算机异步运行Python脚本? - How to Run Python Script from Remote Machine via Powershell Asynchronously? 如何通过远程或本地计算机上的 powershell 检查用户权限 - How to Check User's Rights via powershell on a remote or local machine 通过 openSSH 在远程机器上执行 Powershell 命令 - Powershell commands on remote machine via openSSH 使用PowerShell和WinRM访问远程计算机上的GUI - Access to GUI on remote machine using PowerShell and WinRM 如何使用PowerShell从远程计算机获取所有(IIS)网站状态/状态? - How to get all (IIS) websites status/state from remote machine using PowerShell? 通过 PowerShell 脚本在远程机器中启动 Bat 文件 - Bat file launch in remote machine via PowerShell scripts 如何使用Powershell在远程计算机上卸载服务? - How to uninstall a service on remote machine using powershell?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM