OK. The entire script file is very large, but when moving it into adaxes, I get two more errors:
" The term 'Get-Recipient' 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. Stack trace: at GetUserIdentities, <No file>: line 79 ↲ at Execute-Procedure, <No file>: line 207 ↲ at <ScriptBlock>, <No file>: line 281
The term 'Get-PublicFolder' 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. Stack trace: at FindFoldersToUpdate, <No file>: line 44 ↲ at Execute-Procedure, <No file>: line 223 ↲ at <ScriptBlock>, <No file>: line 281
"
I've seen this before, where Adaxes doesn't have the same cmdlets as full powershell, which is why I was trying to run the file itself in Powershell directly.
The affected lines are:
$id = (Get-Recipient $user).PrimarySmtpAddress
$foldersFound = @(Get-PublicFolder -Recurse:$recurseOnFolders $includeFolder -ResultSize Unlimited | Sort-Object Identity)
I can attach the entire file if needed, but it is a big one.
What should I do in this case? Is there some Adaxes equivalent to these, or is there some better way to run a Powershell script with cmdlets that Adaxes doesn't recognize?