Chirag Nagrekar has Published 465 Articles

How to enable the basic authentication for windows servers using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:02:53

752 Views

Basic authentication is the insecure authentication for windows. Before enabling it make sure you comply with your organization policies. To enable the basic authentication for the windows servers using PowerShell, we can use the below command.PS C:\> Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $true -VerboseTo enable the basic authentication for the remote ... Read More

How to enable the Azure VM accelerated settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:02:05

169 Views

To enable the Azure VM accelerated settings using PowerShell, we need to enable the EnableAcceleratedNetworking property on the NIC attached to the VM.$vm = Get-AzVM -Name TestVM $nicname = (($vm.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1] $nicsetting = Get-AzNetworkInterface -ResourceGroupName $vm.ResourceGroupName - Name $nicname $nicsetting.EnableAcceleratedNetworking = $trueIn the above example, we are setting AN settings on ... Read More

How to disable the Azure VM accelerated settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:00:48

194 Views

To disable the Azure VM accelerated settings using PowerShell, we need to disable the EnableAcceleratedNetworking property on the NIC attached to the VM.$vm = Get-AzVM -Name TestVM $nicname = (($vm.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1] $nicsetting = Get-AzNetworkInterface -ResourceGroupName $vm.ResourceGroupName - Name $nicname $nicsetting.EnableAcceleratedNetworking = $falseIn the above example, we are setting AN settings on ... Read More

How to get the Azure VM storage account type using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 10:06:59

524 Views

To get the Azure VM storage account type using PowerShell, we need to get the Azure VM storage profile setting from the Get-AzVM command.PS C:\> $vm = Get-AzVM -Name TestVM PS C:\> $vm.StorageProfile.OsDisk.ManagedDisk.StorageAccountTypeOutputTo get the storage account type on the multiple VMs from the specific subscription, use the below command.Get-AzVM ... Read More

How to get the Azure VM disk caching settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 10:05:55

412 Views

To get the azure disk caching settings using PowerShell, we first need to retrieve the VM information using the Get-AzVM command. Before running this command, make sure that you are connected to the Azure account (Connect-AzAccount) and the proper subscription (Set-AzContext).In this example, we have a TestVM.$vm = Get-AzVM -Name ... Read More

How to get the Azure VM disk encryption settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 10:05:29

366 Views

To get the Azure disk encryption settings using PowerShell, we first need to retrieve the VM information using the Get-AzVM command. Before running this command, make sure that you are connected to the Azure account (Connect-AzAccount) and the proper subscription (Set-AzContext).In this example, we have a TestVM.$vm = Get-AzVM -Name ... Read More

How to uninstall the MSI package using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 10:04:41

19K+ Views

To uninstall the MSI package using PowerShell, we need the product code and then the product code can be used with msiexec file to uninstall the particular application.Product code can be retrieved using the Get-Package or Get-WmiClass method. In this example, we will uninstall the 7-zip package.$product = Get-WmiObject win32_product | ... Read More

How to install MSI file to the custom directory using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 10:02:51

2K+ Views

To install the MSI file to the custom directory using PowerShell, we can use the TARGETDIR, INSTALLDIR, INSTALLPATH, etc arguments for the custom path, depending upon the MSI file that it supports.msiexec /i "C:\temp\7z1900-x64.msi" INSTALLDIR="D:\ProgramFiles\7zip" /quietThe above command can be run into PowerShell and cmd both but you can’t control ... Read More

How to get the location of the Azure VM using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 09:47:35

509 Views

To find the location of the particular Azure VM using Az CLI, we can use the below command but before that, you need to make sure you are connected to the Azure cloud and had set that specific subscription.PS C:\> az vm show -n VMName -g ResourceGroupName --query '[location]' -otsvAlternatively, ... Read More

How to list the Azure VMs using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 09:46:33

7K+ Views

To list all the Azure VMs connected to the particular subscription, we need to use the “Az vm” command. Before that, we need to make sure the Azure is connected to the desired subscription, if not use the below command to set the Azure Subscription.az account set -s 'subscription name ... Read More

Previous 1 ... 6 7 8 9 10 ... 47 Next
Advertisements