My current script prompts for user credentials in order to remote sign into exchange server. Is their a way to provide credentials in script and automatically sign into exchange server without prompt?
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://XXXXXX.XXXXXXXXdomain.local/PowerShell/ -Authentication Kerberos -Credential $UserCredential
Import-PSSession $Session -DisableNameChecking