Hi, @Roger Roger ,
I tested with the same syntax and it works properly in my end. The only thing needs to be changed shall be $true and $false. Would you like to provide a screenshot of the cmdlet returned syntax error? And you can try again with it, ensure there is no mistakes.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.