Hello,
i want to deactivate OWA for a user with a template and a powershell script:
The creation of the openorder template and the powershell script was no problem, but the script does not run.
Here the script i use:
param(
[parameter(Mandatory=$true)]
# Übergebene Benutzer ID
$Benutzer
)
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://our Exchange server/PowerShell/ -Authentication Kerberos
Import-PSSession $Session
Sleep 5
Set-CASMailbox -identity $Benutzer -owaenabled $false
Remove-PSSession $Session
The script runs in the context of a user who has exchange admin rights
In the attached log i replaced the original name through OurDomain\OurUser
As you can see in the log, the script does not run
If I run the script in a powershell, it works