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
Microsoft
Jul 23, 2024Got it. I couldn't replicate that error on the latest script version. Are you sure you are running the latest? It should be:
Install-Script -Name Prepare-PlacesEnablement -RequiredVersion 5.0 -Force
Install-Script -Name Prepare-PlacesEnablement -RequiredVersion 5.0 -Force
VishalK95
Jul 23, 2024Copper Contributor
I will recheck tomorrow morning now as away from my machine but when I checked last it was version 5 yes
- VishalK95Jul 25, 2024Copper ContributorThanks for the response I did as you requested, and downloaded the files manually.
Then I proceeded to extract the nupkg packages, set the policy execution policy on the machine I am running the scripts and attempted the following scripts:
PreparePlacesPowershell7 Version 5 - (This was also newly downloaded) Run Successfully
Prepare-PlacesEnablement Version 5 - This failed with the same error - BrettGiammonaJul 24, 2024
Microsoft
I think somehow the old script is still being run. I checked with our engineers and that is not an error code that is associated with V5. Can you try downloading the script manually from PS gallery and then run it from the downloaded location? - VishalK95Jul 24, 2024Copper Contributor
BrettGiammona so checked this morning I can confirm that the Version of script is the latest and version 5.
Reconnected this morning and still getting the same error which is a little annoying hoped that 24 Hours passing it would of bedded in at the backend. I added the -Force at the end as suggested to no avail.
- BrettGiammonaJul 23, 2024
Microsoft
Sounds good. Ensure you try with -Force at the end.