Friday, August 18, 2017

Powershell: Save credentials in a hashed file created from user and the computers SID

That commands hashes it against the logged on user SID and the machines SID.

create and export creds->
$creds = Get-Credential
$creds | Export-CliXml c:\temp\cred.clixml

import creds->
$creds2 = Import-CliXml c:\temp\cred.clixml