
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 975 Articles for Software & Coding

678 Views
From the Azure Portal, we can find the Accelerated Networking (AN) status from the networking blade.To get the AN settings on the VM, we need to first retrieve the NIC information because it is set on it. We have the VM named ‘TestVM’ and we will retrieve its NIC information.PS C:\> $vm = Get-AzVM -Name TestVMTo get the NIC associated with the VM, $nicname = (($vm.NetworkProfile.NetworkInterfaces.id).Split('/'))[-1]We need to retrieve the NIC settings to get the AN setting.$nicsetting = Get-AzNetworkInterface -ResourceGroupName $vm.ResourceGroupName - Name $nicnameTo get the AN settings, use the EnableAcceleratedNetworking property.$nicsetting.EnableAcceleratedNetworkingIf you want to retrieve the AN settings on ... Read More

996 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 windows servers using PowerShell, use the below command.Invoke-Command -ComputerName TestMahchine1, TestMachine2 - ScriptBlock { Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $true -Verbose }

471 Views
Basic authentication is the insecure authentication for the windows. To disable the basic authentication on the windows server using PowerShell,PS C:\> Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $false -VerboseTo disable the basic authentication on the remote windows servers using PowerShell, use the below command,Invoke-Command -ComputerName TestMahchine1, TestMachine2 - ScriptBlock { Set-Item -Path "WSMan:\localhost\Service\Auth\Basic" -Value $false -Verbose }

960 Views
To disable the credssp on the local computer using PowerShell, use the below command.PS C:\> Disable-WSManCredSSP -Role Server -VerboseYou can check if the credssp is disabled, using the below command.PS C:\> Get-ChildItem WSMan:\localhost\Service\Auth | Where-Object {$_.Name -eq"CredSSP"} | Select Name, Value Name Value ---- ----- CredSSP falseTo disable the credssp authentication on the remote computers using PowerShell,Invoke-Command -ComputerName TestMahchine1, TestMachine2 - ScriptBlock { Disable-WSManCredSSP -Role Server }

2K+ Views
Before enabling the credssp authentication for the windows server, we will first check the credssp status using the below command.Get-ChildItem WSMan:\localhost\Service\Auth | Where-Object {$_.Name -eq "CredSSP"} | Select Name, ValueOutputName Value ---- ----- CredSSP falseTo enable the credssp,PS C:\> Enable-WSManCredSSP -role server -ForceOutputcfg : schemas.microsoft.com/wbem/wsman/1/config/service/auth lang : en-US Basic : false Kerberos : true Negotiate : true Certificate : false CredSSP : true CbtHardeningLevel : RelaxedTo enable the credssp authentication on the remote computers,Invoke-Command -ComputerName TestMahchine1, TestMachine2 - ScriptBlock { Enable-WSManCredSSP -Role Server -Force }

998 Views
To get the windows server authentication setting using PowerShell, we can use the below command on the local server.PS C:\> Get-ChildItem WSMan:\localhost\Service\Auth | Select name, valueOutputName Value ---- ----- Basic false Kerberos true Negotiate true Certificate false CredSSP false CbtHardeningLevel RelaxedTo get the same settings on the remote servers, use the below command.Invoke-Command -ComputerName TestMahchine1, TestMachine2 - ScriptBlock { Get-ChildItem WSMan:\localhost\Service\Auth } | Select PSComputerName, Name, Auth

2K+ Views
To get the Azure VM activity logs with PowerShell, we need to use the Get-AzLog command. Before running, AZ commands make sure that you are connected to the Azure Account using (ConnectAzAccount) and the subscription (Set-AzContext).We have the below TestVM, we need to retrieve activity logs and we need its resource id. We will get the resource ID using, PS C:\> $vm = Get-AzVM -VMName TestVMPS C:\> $vm.IdWe need to use this ID in the Get-AzLog command to retrieve the activity logs.PS C:\> Get-AzLog -ResourceId $vm.IdIt will provide all the azure events for that specific resource group and you can ... Read More

648 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 | Select Name,ResourceGroupName, @{N='StorageType';E={$_.StorageProfile.OsDisk.ManagedDisk.StorageAccountType}}

1K+ 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 VM named TestVM. To retrieve the extension name,Get-AzVMExtension -VMName $vm.Name -ResourceGroupName $vm.ResourceGroupName | Select NameOutput

676 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 TestVMWe will use the StorageProfile property and OSdisk sub-property to get the encryption settings.PS C:\> $vm.StorageProfile.OsDisk.CachingOutputTo retrieve the caching settings on all the Azure VMs from the specific subscription, we can use the below command.Get-AzVM | Select Name, ResourceGroupName, @{N='Caching';E={$_.StorageProfile.OSDisk.Caching}}Read More