Symptoms

The task Protect Calendar folder for mailbox fails with the error:

Provisioning request failed. Call of method "SW Managed Exchange::ProtectMailboxCalendarFolder" failed.
Type: Parallels.Wpe.Utils.WpeProcedureException.

Inner exception(s):
-------------------
The term 'LogWarning' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Error position: At C:\Program Files\Parallels\Windows Provisioning Engine\Providers\SW Managed Exchange\ProtectMailboxCalendarFolder.ps1:59 char:5
+ LogWarning("[ProtectMailboxCalendarFolder] 'Add-MailboxFolderPermission' for ...
+ ~~~~~~~~~~

Type: Parallels.Wpe.PowerShell.PowerShellException.

-------------------
The term 'LogWarning' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Type: System.Management.Automation.CommandNotFoundException.

Cause

Bug POA-93023

Resolution

The issue has been fixed in OA update 6.0.5 https://kb.cloudblue.com/en/126467. Please schedule the installation of this update to fix the issue.

The issue occurs because of syntax error in WPE .ps scripts:

C:\Program Files\Parallels\Windows Provisioning Engine\Providers\Common\ProviderUtils\ProviderUtils.psm1 defines LogWarn function:

....
288 function LogWarn(
289     [Parameter(Position=0, Mandatory=$true)]
290     [string]$Message)
....
643 Export-ModuleMember LogDebug, LogInfo, LogWarn, LogError, LogObject, LogStart, LogStop
....

However, the file C:\Program Files\Parallels\Windows Provisioning Engine\Providers\SW Managed Exchange\ProtectMailboxCalendarFolder.ps1 refers to a slightly different name - LogWarning:

....
59                              LogWarning("[ProtectMailboxCalendarFolder] 'Add-MailboxFolderPermission' for group '{0}' failed with error '{1}'" -f  $organizationGroupDN,$_.Exception.Message)
....

To workaround the issue, change LogWarning to LogWarn in the file ProtectMailboxCalendarFolder.ps1.

Internal content