Chirag Nagrekar has Published 465 Answers

Out-GridView in PowerShell

Chirag Nagrekar

Chirag Nagrekar

Updated on 18-Feb-2022 06:57:40

DescriptionOut-GridView in a PowerShell is the output format in the GUI format. Generally, we get the output on the console using the Format-Table or Format-List command. Similarly, Out-GridView is also the output format but we can interact with it because of the GUI format.Moreover, it provides us options to select ... Read More

Exception handling in PowerShell

Chirag Nagrekar

Chirag Nagrekar

Updated on 18-Feb-2022 06:50:00

In this article, we will go through the below points.What is an Exception in PowerShell?Terminating and Non-Terminating errors.Using Try / Catch block.Converting Non-Terminating error to Terminating Errors.Handling actual exception messages.What is the exception in PowerShell?Exception in PowerShell or other programming languages is the error or unexpected result that can be ... Read More

Importing / Exporting CSV file in PowerShell

Chirag Nagrekar

Chirag Nagrekar

Updated on 18-Feb-2022 06:44:37

In this article, we will work with CSV files in PowerShell which is considered one of the most efficient ways to deal with data.We have considered the below points for this article.Exporting data to the CSV file using PowerShell.Importing data from the CSV file using PowerShell.Let’s get started.Exporting data to ... Read More

PowerShell Desired State Configuration

Chirag Nagrekar

Chirag Nagrekar

Updated on 18-Feb-2022 06:25:49

OverviewPowerShell DSC is different than PowerShell scripting which ensures the remote windows systems are in the desired state and it is the declarative method unlike PowerShell Scripting and other programming languages which are considered imperative methods.In this article, we will go through the Push Method of the DSC which is ... Read More

Azure DSC node configuration using PowerShell

Chirag Nagrekar

Chirag Nagrekar

Updated on 18-Feb-2022 06:17:44

What is Azure State DSC?Azure State DSC is nothing but the DSC (Desired State Configuration) for the Azure VMs and can be configured from the Azure Automation Account. For the DSC there are two methods Push and Pull configuration but Azure is by default using the Pull server which constantly ... Read More

How to get the tags of the availability set using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 12:06:32

There are two ways to retrieve the availability set tags. Using the Tags property inside the availability tag and the second by using the Get-AzTag command.Before running this command make sure that you are connected to the Azure Cloud (if not use ConnectAzAccount) and proper azure subscription (Set-AzContext to set the ... Read More

How to get the available Azure VM sizes for the availability set using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 12:04:54

To get the Azure VM sizes available for the availability set, we can use the Get-AzVMSize command with the availability set name. Before running this command make sure that you are connected to the Azure Cloud (if not use Connect-AzAccount) and proper azure subscription (Set-AzContext to set the Azure subscription)Get-AzVMSize ... Read More

How to find the disk type of the Azure Availability set using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

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

There are two types of disks available in the Availability Set.Aligned − for the managed disks.Classic − for the unmanaged disks.To get the disk types of the availability set, we first need to retrieve availability set information and then we need to retrieve the SKU property which stores the disk typesBefore running ... Read More

How to get the update domain count of the Azure Availability set using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:54:09

Virtual machines inside the Availability set get the update automatically, they reboot together and they are used for the patching of the virtual machines.To get the update domain count from the availability set, we can use the below command.Before running this command make sure that you are connected to the ... Read More

How to list the Azure VMs from the Availability set using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 02-Sep-2021 11:50:46

To list the Azure VMs under the availability set, we can use the command as shown belowBefore running the command make sure that you are connected to the Azure Cloud (if not use ConnectAzAccount) and proper azure subscription (Set-AzContext to set the Azure subscription)$availabilitySetVMs = Get-AzAvailabilitySet -ResourceGroupName MYRESOURCEGROUPAVAILABILITY -Name myAvailabilitySetTo ... Read More

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