Chirag Nagrekar has Published 465 Articles

How to get environment variable value using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Oct-2023 13:31:58

63K+ Views

Environment variables are an essential part of the Operating System. They store various information like the path of the system files and folders, the number of processors system running, current user details, and more. Processes and programs utilize these environment variables to retrieve the data for their execution.Environment variables in ... Read More

How to Set environment variables using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 29-Aug-2023 07:24:55

193K+ Views

To set the environmental variable using PowerShell you need to use the assignment operator (=). If the variable already exists then you can use the += operator to append the value, otherwise, a new environment variable will be created.For example, there is no AZURE_RESOURCE_GROUP environment variable that exists in the ... Read More

Out-GridView in PowerShell

Chirag Nagrekar

Chirag Nagrekar

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

4K+ Views

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

9K+ Views

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

7K+ Views

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

958 Views

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

432 Views

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

100 Views

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

134 Views

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

150 Views

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

Advertisements