12Knocksinna / Office365itpros

Office 365 for IT Pros PowerShell examples
MIT License
1.3k stars 573 forks source link

Update UpdateOffice365PowerShellModules.PS1 #87

Closed MarcLaf closed 1 year ago

MarcLaf commented 1 year ago

Adding a check to make sure the variable is not already a string. When in PowerShell 7, the $CurrentVersion is already a string and not an object like in PowerShell 5.1 and doesn't need to be converted. This results in an error.