Chirag Nagrekar has Published 465 Articles

How to resolve - The underlying connection was closed - Could notestablish trust relationship for the SSL/TLS secure channel in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 01-Sep-2021 07:43:41

11K+ Views

When you run Invoke-WebRequest or Invoke-RestMethod command, sometimes you get the error “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.” because there could be a certificate issue or the required windows version doesn’t support the TLS or SSL version. You can use the ... Read More

How to get the Accelerated networking status of Azure VM using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

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

440 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 ... Read More

How to retrieve the MSI package product code using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:28:17

11K+ Views

You can retrieve the MSI installed packaged product code on the windows OS using PowerShell with Get-Package or Get-WmiObject command.In this example, we will retrieve the product code of 7-zip.Get-Package -Name '7-Zip 19.00 (x64 edition)' | fl *You can use the tagid or mentioned properties to filter the product code.To ... Read More

How to get the Azure VM username using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:13:16

620 Views

To get the Azure VM username using Az CLI, we need to use the below command.PS C:\> az vm show -n AzVM -g ResourceGroup --query '[osProfile.adminUsername]' -otsvThe above command will retrieve the Azure VM username. You can also use the below command to retrieve the Azure VM username without knowing ... Read More

How to get the Azure VM Size using Azure CLI in PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:12:45

1K+ Views

To get the Azure VM size using Azure CLI, we first need to make sure that the Azure account is connected to the specific subscription for the VM that we need to retrieve the VM size.To get the specific Azure VM size, we need to first retrieve the VM details ... Read More

How to get Azure VM activity logs using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:09:31

1K+ 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 ... Read More

How to get the windows authentication settings using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:07:33

711 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 ... Read More

How to enable credssp authentication on windows server using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

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

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       ... Read More

How to disable the credssp authentication using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

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

584 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 ... Read More

How to disable basic authentication for windows server using PowerShell?

Chirag Nagrekar

Chirag Nagrekar

Updated on 31-Aug-2021 11:03:12

306 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 { ... Read More

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