We have a SailPoint AfterCreate rule that is configured for our AD source to create/enable remote mailboxes after the AD account gets created.
The Powershell script works fine in most cases, but when there is a bulk user creation activity (more than 50+) the script encounters a session error, probably because of the number of concurrent sessions running parallelly.
Here is the error that we receive - Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again.
We are using the Powershell AfterCreate template in the IDN documentation.
Also tried adding the below command in the PS script to close out each session, but that too did not help.
Remove-PSSession $ExchangeSession
Has anyone encountered similar issue.? Any suggestions would be much appreciated.
I think the issue is with arguments you are passing to the PowerShell script to Enable Remote mailbox, for some users an argument is missing but you might have set
[Parameter(Mandatory = $true)]
Add logs and check what is missing or what is happening for the failed users.