OfficeDev / Office-IT-Pro-Deployment-Scripts

A collection of useful PowerShell scripts to make deploying Office 2016 and Office 365 ProPlus easier for IT Pros and administrators. If you have any feature requests or ideas for future scripts please add the idea to the issues list in this repository
http://officedev.github.io/Office-IT-Pro-Deployment-Scripts
MIT License
882 stars 838 forks source link

Remove Office Click To Run PS1 Error #354

Open ghost opened 4 years ago

ghost commented 4 years ago

When running the .ps1 file in Powershell as an admin I get the following error

At C:\Users\Wyatt\Desktop\Remove-OfficeClickToRun.ps1:517 char:123 + ... ent.Automation.PSPropertySet(‘DefaultDisplayPropertySet’,[string[ ... + ~ Missing argument in parameter list. + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : MissingArgument

Throws error line 517 which is: $defaultDisplayPropertySet = New-Object System.Management.Automation.PSPropertySet(‘DefaultDisplayPropertySet’,[string[]]$defaultDisplaySet)