Chirag Nagrekar has Published 465 Articles

How to retrieve the OS caching setting of Azure VM using AzureCLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:02:24

115 Views

To retrieve the OS Caching setting of the Azure VM using CLI, we can use the below command.PS C:\> az vm show -n VMName -g VMRG --query storageProfile.osDisk.caching -otsvOutputReadWriteYou can also get the caching setting on the Azure VM without using the resource group name using the command below.PS C:\> ... Read More

How to retrieve the OS of the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 10:59:25

1K+ Views

To retrieve the Azure VM OS using Azure CLI, we can use the “az vm” command but before that, need to make sure that you are connected to the Azure cloud and the subscription.PS C:\> az vm show -n VMName -g VMRG --query "[storageProfile.imageReference.offer]" -otsvORPS C:\> az vm show -n VMName ... Read More

How to get the load balancers connected to the Azure VM using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:52:41

417 Views

To get the load balancers attached to the Azure VM using PowerShell, we first need to retrieve the Azure VM network settings. For example, we have an Azure VM name “TestVM” and we willPS C:\> $vm = Get-AzVM -Name TestVM $nic = (($vm.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1]Once we have the network interface name, we ... Read More

How to get the Azure VM virtual Network and the Subnet name using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:51:41

1K+ Views

To retrieve the Azure VM virtual network and subnet name, we first need to retrieve the AzureVM NIC information. To get the Azure VM NIC information, we need to use the Get-AzVM command, and then we can use the NetworkProfile property to retrieve the NIC name as shown below.PS C:\> ... Read More

How to retrieve the Azure VM nic name using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:49:50

351 Views

To get the Azure VM NIC name using Azure CLI, use the below command but before running the command make sure that you are connected to the Azure Account and the proper Azure subscription using Azure CLI.az vm show -n AzureVM -g ResourceGroup --query '[networkProfile.networkInterfaces][].id' -otsvWe need the NIC name ... Read More

How to get the currently logged-in user account with Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:35:09

8K+ Views

To get the connected user account with the Azure CLI, you need to use the below command.PS C:\> az account showOnce you type the command, you will get the output in JSON format as shown below.PS C:\> az account show {    "environmentName": "AzureCloud",    "homeTenantId": "Your tenant ID",   ... Read More

How to Install the Azure CLI on Windows using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:32:31

5K+ Views

To install the Azure CLI, you can download it from the location below, https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli/To install the Azure CLI using PowerShell, use the below command.Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows - OutFile .\AzureCLI.msi Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet' rm .\AzureCLI.msiTo check if the Az CLI is installed successfully run the Az in ... Read More

How to get the Azure VM available sizes using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:31:05

550 Views

To get the Azure VM sizes using PowerShell, we can use the Get-AzVmSize command.To get all the supported Azure VM sizes as per location, use the below command.PS C:\> Get-AzVMSize -Location EastusOutputTo get available and supported size for the existing virtual machine, use the below command.Get-AzVMSize -ResourceGroupName ResourceGroup1 -VMName TestVMRead More

How out-gridview selection works in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:28:50

996 Views

With the PowerShell Out-Gridview output, you have an option to select one or multiple selections.For example, if we run the below command, it will show us the output in the grid format.PS C:\> Get-Process | Out-GridViewIn this output, you don’t get any option to select the rows because its output ... Read More

How to get the installed Azure VM extension using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 09:19:01

822 Views

To get the installed Azure VM extension using PowerShell, we can use the Get-AzVmExtension command and we need to provide VM name and the resource group name in the command.$vm = Get-AzVM -Name TestVM Get-AzVMExtension -VMName $vm.Name -ResourceGroupName $vm.ResourceGroupNameThe above command will retrieve all the extensions in detail of the ... Read More

Previous 1 ... 3 4 5 6 7 ... 47 Next
Advertisements