Open jakiefermsft opened 3 years ago
Hi, thanks for posting this. I'm also on MacOS, and am trying to follow these steps, but am struggling a bit.
I installed Powershell 7.0.3.
🍺 powershell was successfully installed!
~ pwsh
PowerShell 7.0.3
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
Then, I attempt to uninstall the modules you listed:
PS /Users/yvonneradsmikham> Uninstall-Module Az
Uninstall-Package: /usr/local/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:12731
Line |
12731 | … $null = PackageManagement\Uninstall-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module names 'Az'.
PS /Users/yvonneradsmikham> Uninstall-Module Azure
Uninstall-Package: /usr/local/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:12731
Line |
12731 | … $null = PackageManagement\Uninstall-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module names 'Azure'.
PS /Users/yvonneradsmikham> Uninstall-Module AzureRM
Uninstall-Package: /usr/local/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:12731
Line |
12731 | … $null = PackageManagement\Uninstall-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module names 'AzureRM'.
PS /Users/yvonneradsmikham> Uninstall-Module AzureAD
Uninstall-Package: /usr/local/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:12731
Line |
12731 | … $null = PackageManagement\Uninstall-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module names 'AzureAD'.
Then, attempt to unregister the Posh Test Gallery (which doesn't appear to exist):
PS /Users/yvonneradsmikham> Unregister-PSRepository -Name 'Posh Test Gallery'
Unregister-PackageSource: /usr/local/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:12884
Line |
12884 | … $null = PackageManagement\Unregister-PackageSource @PSBoundParame …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Unable to find repository 'Posh Test Gallery'. Use Get-PSRepository to see all available repositories.
Restarting powershell...
PS /Users/yvonneradsmikham> exit
~ pwsh
PowerShell 7.0.3
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
And attempt to install the modules:
PS /Users/yvonneradsmikham> Install-Module Az
Install-Package: /usr/local/microsoft/powershell/7/Modules/PowerShellGet/PSModule.psm1:9709
Line |
9709 | … talledPackages = PackageManagement\Install-Package @PSBoundParameters
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No match was found for the specified search criteria and module name 'Az'. Try Get-PSRepository to see all
| available registered module repositories.
Am I doing something wrong?
A few of us on mac got stuck with the very first powershell step and getting the correct modules installed. The following process was used by a few of us and seemed to work pretty well.
Bootstrap Mac Powershell
brew cask install powershell
or Restart powershellUnregister-PSRepository -Name 'Posh Test Gallery'
This should get you "clean", then:
Install-Module Az
Install-Module Azure
Install-Module -Name Az.Accounts -AllowPrerelease -Force
Register-PackageSource -Trusted -ProviderName 'PowerShellGet' -Name 'Posh Test Gallery' -Location https://www.poshtestgallery.com/api/v2/
Install-Module AzureAD.Standard.Preview
Import-Module Az
Import-Module Azure
Import-Module AzureAD.Standard.Preview
You should then be able to login, set you subscription then set your azuread to point at the new tenant.
When you go to run the first ps1 file you need to add the -adminPassword as explained in the docs because you are on mac.