Hi Together
I have a following Problem...
I am trying to connect programaticaly to Exchange Server 2013 (Windows 2012) from another domain using
"System.Management.Automation.Runspaces.WSManConnectionInfo"
and Runspace to be able tu run powershell commands remotely.
The Problem is that i get message Access denied although i am connecting with Administrator account.
Error message i get:
Connecting to remote server failed with the following error message : Access is denied. For more
information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportException
+ FullyQualifiedErrorId : PSSessionOpenFailed
It seems to be a Problem with path of Powershell Virtual Directory in IIS.It Shows following directory path C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell-Proxy.
As soon as i change the path to C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell instead of Powershell-Proxy, which is actualy a valu on Exchange 2010 Version, everything is working fine and i am able to connect to Exchange and execute Exchange powershell commands.The Problem with this configuration is that if i change the path, Microsoft Exchange Powershell Console localy on Exchange Server does not work anymore.I get lot of Errors...
My IIS Configuration has Basic and Windows authentication enabled and winrm config is configured as follow:
Config
MaxEnvelopeSizekb = 500
MaxTimeoutms = 60000
MaxBatchItems = 32000
MaxProviderRequests = 4294967295
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = true
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 = true
Auth
Basic = true
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
AllowRemoteAccess = true
Winrs
AllowRemoteShellAccess = true
IdleTimeout = 7200000
MaxConcurrentUsers = 10
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 25
MaxMemoryPerShellMB = 1024
MaxShellsPerUser = 30
Please advise how to connect.What am i doing wrong.Why it is working if i change powershell virtual Directory to old path..I am struggling with it for several days....
Please help