Azure IaaS
4 Topicserror - WARNING: The version '1.9.4' of module 'Az.Accounts' is currently in use. Powershell script
PS C:\Application01>Install-Module -Name Az -AllowClobber -Scope AllUsers PS C:\Application01>Connect-AzAccount ### this prompts me for my azure logon PS C:\Application01>Update-Module -Name Az PS C:\Application01>.\Publish-Application01.ps1 -action "Deploy" ` -azureAccountApplicationId "a3XXXXXXXXXXXXXXXXXXXXXXXX76" ` -azureAccountPassword "43XXXXXXXXXXXXXXXXXXXXXXXXXXXm" ` -package "C:\Application01\Application01.server.Web.zip" ` -azureSubscriptionId "c27XXXXXXXXXXXXXXXXXXXXXXXXX32" ` -azureAccountTenantId "41XXXXXXXXXXXXXXXXXXXXXXXXX1d" ` -hostAdminPassword "XXXXXXXXXXXX" ` -defaultTenantAdminPassword "XXXXXXXXXXX" ` -resourceGroupName "RG01" ` -appServiceName "Applicationservice01" ` -nugetRepositoryType "Composite" ` -storageType "Azure" ` -storageLocation "DefaultEndpointsProtocol=https://XXXXXXXXX" ` -appSettings @{"Telemetry.Enabled"="false"} ` -verbose WARNING: The version '1.9.4' of module 'Az.Accounts' is currently in use. Retry the operation after closing the applications. WARNING: The provided service principal secret will be included in the 'AzureRmContext.json' file found in the user profile ( C:\Users\zzadmin\.Azure ). Please ensure that this directory has appropriate protections. Connect-AzAccount : The provided account a3XXXXXXXXXXXXXXXXXXXX76 does not have access to subscription ID "c2XXXXXXXXXXXXXXXXXXXXXXXX2". Please try logging in with different credentials or a different subscription ID. At C:\Application01\Publish-Application01.ps1:577 char:9 + if (Connect-AzAccount -Environment AzureUSGovernment -ServicePrin ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Connect-AzAccount], PSInvalidOperationException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand XXXXXXXXXXXXXXXXXX Line 577 >>> -ServicePrincipal -- my understanding is a prompt will appear to enter a value for ServicePrincipal. function AuthenticateToAzure { $securePassword = $azureAccountPassword | ConvertTo-SecureString -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential($azureAccountApplicationId, $securePassword) if (Connect-AzAccount -Environment AzureUSGovernment -ServicePrincipal -SubscriptionId $azureSubscriptionId -TenantId $azureAccountTenantId -Credential $credential){ Write-Host "Logged in to Az" -ForegroundColor Green } else { Write-Error "Failed to log in to Az" Exit 1 } XXXXXXXXXXXXXX I have tried rebooting the VM and error still appears. The zzadmin account on the VM is a local administrator.4.4KViews0likes0CommentsHow to get SQL Server Version on multiple Servers on Azure using Power shell.
I have 300 servers on azure, i have to find the detailsof SQL Server Version in all servers on Azure. how to do this using Power shell? (like i can put the name of the servers in a file and get the output in another file).1.8KViews0likes3CommentsList of resource on Azure
Hello everyone. Anyone have a script that export the resources from Azure to csv. I need the script that show this information: Name VM Resource group Backup Private ip Public IP Virtual Network Subnet Version of Operation System Disks / capacity of them / Letter of disk Type of VM Thank you for help Nuno Magalhaes602Views0likes0Comments