1
votes

I'm using "http://gallery.technet.microsoft.com/scriptcenter/Configures-Secure-Remote-b137f2fe" for configuring secure remote powershell access to my Azure VM. It works good.

I deleted my machine with keeping attached disks. I've recreated this machine with previous identical parameters, but from "my disk" option.

And after that my secure remote powershell access stop working. Every time I tried to use "http://gallery.technet.microsoft.com/scriptcenter/Configures-Secure-Remote-b137f2fe" for downloading certificate i recieved the following error:

Get-AzureCertificate : Cannot validate argument on parameter 'Thumbprint'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again. At C:\Users\username\Desktop\InstallWinRMCertAzureVM.ps1:54 char:83 + ... me -Thumbprint $WinRMCert -ThumbprintAlgorithm sha1 + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Get-AzureCertificate], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.WindowsAzure.Commands.ServiceManagement.Certi ficates.GetAzureCertificate

Actually, the option (Get-AzureVM -ServiceName $CloudServiceName -Name $Name | select -ExpandProperty vm).DefaultWinRMCertificateThumbprint is empty. But in original machine it was a valid thumbprint.

Can someone point me in the right direction, please?

1

1 Answers

0
votes

Problem was fixed. Partially :) So, I connected to my virtual machine via RDP and manually export certificate from LocalMachine store. After that, I've imported certificate to my local machine to the "Trusted Root Certification Authorities" (!) section in Local Machine store. DefaultWinRMCertificateThumbprint field in Azure VM setting is still empty, but now I can connect to machine via Powershell without any problems.