Forum Discussion
tjhdev2024
Jun 26, 2024Copper Contributor
Prepare-PlacesEnablement script fails with "Cannot overwrite variable false because it is read-only"
From the instructions on https://learn.microsoft.com/en-us/deployoffice/places/deployment-guide-for-places PS C:\Users\Administrator> Install-Script -Name Prepare-PlacesEnablement -RequiredVersion...
- Jul 03, 2024Hey all, we have posted updated scripts that should resolve this issue. Please check the latest instructions and commands here: https://learn.microsoft.com/en-us/deployoffice/places/deployment-guide-for-places
BrettGiammona
Jul 03, 2024Microsoft
Hey all, we have posted updated scripts that should resolve this issue. Please check the latest instructions and commands here: https://learn.microsoft.com/en-us/deployoffice/places/deployment-guide-for-places
- mparc1260Jul 10, 2024Copper Contributor
The new script still doesn't work, same error
...Prepare-PlacesEnablement.ps1 -PlacesWebApp $true -PlacesAdvancedFeatures $true -PlacesAnalytics $true -PlacesMobileApp $true
WriteError: C:\Users\mparc\Documents\PowerShell\Scripts\Prepare-PlacesEnablement.ps1:52
Line |
52 | [bool]$PlacesMobileApp = $false,
| ~~~~~~~
| Cannot overwrite variable false because it is read-only or constant. - tjhdev2024Jul 08, 2024Copper Contributor
BrettGiammona Version 4 does not produce a PowerShell error message, and defaults all params to False. A single parameter set to true is processed as expected.
PS C:\Users\Administrator> Prepare-PlacesEnablement $ PS C:\Users\Administrator> Prepare-PlacesEnablement -placesmobileapp $true $ Enabling the group that can use the Places iOS App Looking for group - Places Mobile Users [8C8BF34B-6BB8-4441-A911-3A990C9D838B] Update completed successfully. To check the information updated please use the next cmdlet which reads updated values of settings from store. Get-PlacesSettings -ReadFromPrimary WARNING: The settings are read from a cached storage for upto 12 hours.
- BrettGiammonaJul 08, 2024MicrosoftThat looks right. You can override the default params to True for any features you wish to turn on.
- baczerJul 04, 2024Copper Contributor
- BrettGiammonaJul 08, 2024Microsoft
Try script version 4.0 and let me know if that works:
Install-Script -Name Prepare-PlacesEnablement -RequiredVersion 4.0 -Force - Stephanie NicholsJul 08, 2024Brass ContributorConfirming that I'm also still getting the error message with the new scripts.