Accessing Exchange Server 2010 with Remote Powershell on Domain Joined
System
To enable remote Shell for a user
Set-User
Username -RemotePowerShellEnabled $True
--Windows PowerShell scripts (if any) will be allowed to run on your compute--
$UserCredential
= Get-Credential
$Session =
New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
http:///PowerShell/ -Authentication
Kerberos -Credential $UserCredential
Import-PSSession
$Session
Disconnects from the Exchange 2010 server
Remove-PSSession
$Session
Accessing Exchange Server 2010 with Remote Powershell on Non-Domain Joined
System
--Windows PowerShell scripts (if any) will
be allowed to run on your compute--
Set-ExecutionPolicy
RemoteSigned
--To get around with sethis and basically
ignore all certificate issues all together, you can create a PSSessionOption
object that disables these certificate validation checks--
$so =
New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
--- Enable Basic Authentication on
Powershell Virtual Directory ----
$session =
New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
https:///powershell -Authentication basic -Credential
(Get-Credential) -SessionOption $so
Import-PSSession $session
Disconnects from the Exchange 2010 server
Remove-PSSession
$Session
No comments:
Post a Comment