[英]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.