2017-05-25 174 views
1

我已經啓用服務器上PSRemoting:PowerShell遠程訪問被拒絕

Enable-PSRemoting -Force 

我還檢查該端口是否正確監聽的正確IP地址使用命令:

winrm enumerate winrm/config/listener 

然而,當我嘗試創建一個新的PSSession環回地址:

New-PSSession ::1 

它給出了以下錯誤:

New-PSSession : [[::1]] Connecting to remote server [::1] failed with the following error message : Access is denied. 
For more information, see the about_Remote_Troubleshooting Help topic. 
At line:1 char:1 
+ New-PSSession ::1 
+ ~~~~~~~~~~~~~~~~~ 
+ CategoryInfo   : OpenError: 
(System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException 
+ FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed 

在解決此任何幫助,將不勝感激!

這裏是輸出

winrm get winrm/config 

不知道是否它幫助:

Config 
    MaxEnvelopeSizekb = 500 
    MaxTimeoutms = 60000 
    MaxBatchItems = 32000 
    MaxProviderRequests = 4294967295 
    Client 
     NetworkDelayms = 5000 
     URLPrefix = wsman 
     AllowUnencrypted = false 
     Auth 
      Basic = true 
      Digest = true 
      Kerberos = true 
      Negotiate = true 
      Certificate = true 
      CredSSP = false 
     DefaultPorts 
      HTTP = 5985 
      HTTPS = 5986 
     TrustedHosts 
    Service 
     RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD) 
     MaxConcurrentOperations = 4294967295 
     MaxConcurrentOperationsPerUser = 1500 
     EnumerationTimeoutms = 240000 
     MaxConnections = 300 
     MaxPacketRetrievalTimeSeconds = 120 
     AllowUnencrypted = false 
     Auth 
      Basic = false 
      Kerberos = true 
      Negotiate = true 
      Certificate = false 
      CredSSP = false 
      CbtHardeningLevel = Relaxed 
     DefaultPorts 
      HTTP = 5985 
      HTTPS = 5986 
     IPv4Filter = * 
     IPv6Filter = * 
     EnableCompatibilityHttpListener = false 
     EnableCompatibilityHttpsListener = false 
     CertificateThumbprint 
     AllowRemoteAccess = true 
    Winrs 
     AllowRemoteShellAccess = true 
     IdleTimeout = 7200000 
     MaxConcurrentUsers = 10 
     MaxShellRunTime = 2147483647 
     MaxProcessesPerShell = 25 
     MaxMemoryPerShellMB = 1024 
     MaxShellsPerUser = 30 

回答

0

運行PowerShell中以管理員身份。提高特權解決了我的情況下的問題。

+0

這是行不通的。我犯了同樣的錯誤。正如我在另一臺服務器上測試過的那樣,遠程處理命令應該不會以管理員身份運行 – Zelurd