Menu

PSI: Using $Test in ExchangeOnline PowerShell Scripts

Reddit r/sysadmin·u/TheBlueFireKing·6 months ago
#Y41ePkoR
#boolean#test#system#false#scripts
Reading 0:00
15s threshold

In the last days we suddenly had multiple scripts fail with the following Error:

Cannot convert value "System.Management.Automation.PSCustomObject" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or O. (Cannot convert value "System.Management.Automation.PSCustomObject" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or O. (Cannot convert value "System.Management.Automation.PSCustomObject" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or O.))

There were no changes to the Script itself. We are running them over AzureAutomate on Hybrid Workers.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.