Forum Discussion

AdamK_DC's avatar
AdamK_DC
Brass Contributor
Jul 11, 2024

Prepare-PlacesEnablement script fails with "Please run the PreparePlacesPowershell7 script first"

And yet I literally ran PreparePlacesGroups.ps1 before this in the same Admin PowerShell Window.  Suggestions?

 

PS C:\program files\WindowsPowerShell\Scripts> PreparePlacesGroups.ps1
Adding the Exchange module

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
WARNING: Version '3.2.0' of module 'ExchangeOnlineManagement' is already installed at
'C:\Users\akuhn-admin\Documents\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.2.0'. To install version '3.5.1',
run Install-Module and add the -Force parameter, this command will install version '3.5.1' side-by-side with version
'3.2.0'.

----------------------------------------------------------------------------------------
This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets which doesn't require WinRM for Client-Server communication. You can now run these cmdlets after turning off WinRM Basic Auth in your client machine thus making it more secure.

Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parity with the RPS (V1) cmdlets.

V3 cmdlets in the downloaded module are resilient to transient failures, handling retries and throttling errors inherently.

REST backed EOP and SCC cmdlets are also available in the V3 module. Similar to EXO, the cmdlets can be run without WinRM basic auth enabled.

For more information check https://aka.ms/exov3-module
----------------------------------------------------------------------------------------

Creating a security group - Places Users
Creating a security group - Places Mobile Users
Creating a security group - Places Analytics Users
Creating a security group - Places Advanced Features
Creating a security group - Places Finder Users
Adding Places Advanced Feature Users to the Places Users group
Adding Places Mobile Users to the Places Advanced Features group
Adding Places Analytics Users to the Places Advanced Features group
Adding Places Finder Users to the Places Advanced Features group
Places Security Groups have been created.

 

And then

 

PS C:\program files\WindowsPowerShell\Scripts> dir


Directory: C:\program files\WindowsPowerShell\Scripts


Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 7/11/2024 12:00 PM InstalledScriptInfos
-a---- 7/9/2024 9:18 PM 7175 Prepare-PlacesEnablement.ps1
-a---- 7/9/2024 9:18 PM 4167 PreparePlacesGroups.ps1


PS C:\program files\WindowsPowerShell\Scripts> Prepare-PlacesEnablement.ps1 -PlacesWebApp $true -PlacesAdvancedFeatures $true -PlacesAnalytics $true -PlacesMobileApp $true -PlacesFinder $true
C:\Program Files\WindowsPowerShell\Scripts\Prepare-PlacesEnablement.ps1 : Please run the PreparePlacesPowershell7
script first
At line:1 char:1
+ Prepare-PlacesEnablement.ps1 -PlacesWebApp $true -PlacesAdvancedFeatu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Prepare-PlacesEnablement.ps1

 

 

  • mr_aryalcode444's avatar
    mr_aryalcode444
    Copper Contributor

    AdamK_DC , 

    Here are the steps to resolve this issue:

    1. 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 PowerShell Gallery. 

     

    1. 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.

    1. 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! 😊

    • AdamK_DC's avatar
      AdamK_DC
      Brass Contributor

      mr_aryalcode444 

       

      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

    • AdamK_DC's avatar
      AdamK_DC
      Brass Contributor

      mr_aryalcode444 

       

      digging further - I manually installed Places - seemingly successfully - and then it won't connect to places:

       

      PS C:\WINDOWS\system32> Install-Module -Name MicrosoftPlaces -AllowPrerelease -Force
      PS C:\WINDOWS\system32> Connect-MicrosoftPlaces
      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 line:1 char:1
      + Connect-MicrosoftPlaces
      + ~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : ObjectNotFound: (Connect-MicrosoftPlaces:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

      PS C:\WINDOWS\system32>

      • AdamK_DC's avatar
        AdamK_DC
        Brass Contributor

        AdamK_DC 

         

        I hacked away at it until I got it.  But I won't be able to say that fully until I see that the web view works.  We're a small org with several meeting rooms.  Not even sure this will be worth it.  

Resources