Forum Discussion
Prepare-PlacesEnablement script fails with "Please run the PreparePlacesPowershell7 script first"
AdamK_DC ,
Here are the steps to resolve this issue:
Install the Required Module: First, ensure that you have the PreparePlacesPowershell7 module installed. You can do this by running the following command in PowerShell 7:Install-Script -Name PreparePlacesPowershell7
If prompted about an untrusted repository, you can confirm the installation from the ‘PSGallery’ repository. You can also manually download the module from the https://www.powershellgallery.com/packages/PreparePlacesPowershell7/4.0
Run the PreparePlacesPowershell7 Script: Open a new PowerShell 7 window (separate from the one where you ran PreparePlacesGroups.ps1). Then execute the following command:
Prepare-PlacesPowershell7
This script sets up the necessary environment for Places cmdlets.
Run the Prepare-PlacesEnablement.ps1 Script: After successfully running the PreparePlacesPowershell7 script, you can now execute the Prepare-PlacesEnablement.ps1 script with the desired parameters. For example:
Prepare-PlacesEnablement.ps1 -PlacesWebApp $true -PlacesAdvancedFeatures $true -PlacesAnalytics $true -PlacesMobileApp $true -PlacesFinder $true
Make sure to adjust the parameters according to your requirements.
By following these steps, you should be able to resolve the issue and enable the necessary features for Places. If you encounter any further issues, feel free to ask for additional assistance! 😊
Slight progress, but no success. I had failed to install and run PreparePlaces. Instead I had installed and run PrepareGroups.
So I installed and ran PreparePlacesPowershell7. It started to work - but then threw up errors also.
PlacesEnablement still threw up the error to run PreparePlacesPowershell7 first.
I think I'm getting closer. Maybe other modules are needed?
PS C:\program files\WindowsPowerShell\Scripts> PreparePlacesPowershell7.ps1
Installing Places Module
Connect-MicrosoftPlaces : The term 'Connect-MicrosoftPlaces' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again. At C:\Program Files\WindowsPowerShell\Scripts\PreparePlacesPowershell7.ps1:43 char:1 + Connect-MicrosoftPlaces + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Connect-MicrosoftPlaces:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Connect-AzAccount : The term 'Connect-AzAccount' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At C:\Program Files\WindowsPowerShell\Scripts\PreparePlacesPowershell7.ps1:46 char:1
+ Connect-AzAccount
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-AzAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y
Welcome to Microsoft Graph!
Connected via delegated access using 14d82eec-204b-4c2f-b7e8-296a70dab67e
Readme: https://aka.ms/graph/sdk/powershell
SDK Docs: https://aka.ms/graph/sdk/powershell/docs
API Docs: https://aka.ms/graph/docs
NOTE: You can use the -NoWelcome parameter to suppress this message.
Update-AzConfig : The term 'Update-AzConfig' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At C:\Program Files\WindowsPowerShell\Scripts\PreparePlacesPowershell7.ps1:52 char:1
+ Update-AzConfig -EnableLoginByWam $false
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Update-AzConfig:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
- pcrack72Aug 13, 2024Copper Contributor
AdamK_DC
i followed the Deployment Guide from MS and used all of the latest PS Scripts.
https://learn.microsoft.com/en-us/microsoft-365/places/deployment-guide-for-places
After a lot of try and error, the first two scripts working:
- https://www.powershellgallery.com/packages/prepareplacesgroups/3.0
- https://www.powershellgallery.com/packages/PreparePlacesPowershell7/6.0If i run the latest Script for the Enablement https://www.powershellgallery.com/packages/Prepare-PlacesEnablement/7.0
i still get the following error message:
I used the latest stable Powershell V 7.4.4 and opened as a Admin.
U faced same or similar message?
Thanks for any helpful feedback!