i wrote a script for Exchange Management Shell. i've saved the script on the server. my question is: how can i run the script from a remote windows 10 Computer? *regarding to server authentiication - it's O.K for me to write my server Credentials on the script
i've try this script, but it's asking for user and password every time and cannot exeute the file.
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://mailserver/PowerShell/ -Authentication Kerberos -Credential $UserCredential
Import-PSSession $Session
Invoke-Command -ComputerName mailserver -FilePath \\mailserver\c$\Script\MPC3.ps1
EDIT:
i want to be able to open the following PS on my Windows computer:
Thanks for helping me !