Friday, February 11, 2022

Azure and Powershell - Round 1

 Install-Module -Name Az -Verbose


(did you try Install-Module -Name -Az -Verbose -Force ?  Hello, Azure for Dummies readers.  It is an irresponsible typo.)



PS C:\WINDOWS\system32> Install-Module -Name -Az -Verbose -Force


NuGet provider is required to continue

PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet

 provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or

'C:\Users\XXXXXX\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running

 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and

import the NuGet provider now?

[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):







VERBOSE: Valid authenticode signature found in the file 'Az.Accounts.psd1' for the module 'Az.Accounts'.

PackageManagement\Install-Package : The following commands are already available on this

system:'Login-AzAccount,Logout-AzAccount,Resolve-Error,Send-Feedback'. This module 'Az.Accounts' may override the

existing commands. If you still want to install this module 'Az.Accounts', use -AllowClobber parameter.

At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21

+ ...          $null = PackageManagement\Install-Package @PSBoundParameters

+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],

   Exception

    + FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack

   ageManagement.Cmdlets.InstallPackage




>Connect-AzAccount






https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2












Update-Help: Failed to update Help for the module(s) 'ConfigDefenderPerformance, PSReadline, WindowsUpdateProvider' with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).).
English-US help content is available and can be installed using: Update-Help -UICulture en-US.
PS C:\Windows\System32> Update-Help -UICulture en-US
Update-Help: Failed to update Help for the module(s) 'ConfigDefenderPerformance, PSReadline, WindowsUpdateProvider' with UI culture(s) {en-US} : One or more errors occurred. (Response status code does not indicate success: 404 (The specified blob does not exist.).).
English-US help content is available and can be installed using: Update-Help -UICulture en-US.
PS C:\Windows\System32>











PS C:\Windows\System32> Connect-AzAccount
WARNING: Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide













No comments: