Last active
March 25, 2017 23:35
-
-
Save PrateekKumarSingh/b27112b99736e4bbb1c849f3352e46c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $domain = 'domain\Username' | |
| $pass = ConvertTo-SecureString -String 'somepassw@rd123' -AsPlainText -Force | |
| $creds = New-Object System.Management.Automation.pscredential -ArgumentList $domain, $pass | |
| $s = New-PSSession -ConfigurationName Microsoft.Exchange ` | |
| -ConnectionUri http://ExchangeServerName/PowerShell/ ` | |
| -Authentication Kerberos ` | |
| -Credential $creds | |
| Import-PSSession $s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment