Winrm Using Certificate[PFX]
Notes to connect to a system through Winrm using a certificate [pfx]
From Windows
First, import the certificate and then use Powershell script to get a session over winrm
.
For this we need a valid certificate, ComputerName
and CertificateSubject
. We can simply use IP
as ComputerName
and for CertificateSubject
, we dump data from the certificate using certutil
.
Command => certutil -dump .\0xEr3bus.pfx
Looking at the output we see Issuer: CN=Erebus
, This is the CertificateSubject
Now run the command ==>
.\
session.ps1 -ComputerName 10.10.xx.xx -CertificateSubject "CN=Erebus"
For Linux
Reference => Link
Last updated