Skip to content

Instantly share code, notes, and snippets.

@mczerniawski
Created September 4, 2018 10:48
Show Gist options
  • Select an option

  • Save mczerniawski/0f42b91b7bee6033474463f49a43bf3e to your computer and use it in GitHub Desktop.

Select an option

Save mczerniawski/0f42b91b7bee6033474463f49a43bf3e to your computer and use it in GitHub Desktop.
$ComputerName = 'nbmczerniawski2'
$DNComputer = Get-ADComputer $computerName | Select-Object -ExpandProperty DistinguishedName
$obj = get-adobject -Filter {objectclass -eq 'msFVE-RecoveryInformation'} -SearchBase $DNComputer -Properties 'msFVE-RecoveryPassword' | Select-Object Name,msFVE-RecoveryPassword
[Ordered]@{
ComputerName = $ComputerName
RecoveryPassword = $obj.'msFVE-RecoveryPassword'
Date = Get-Date -Date ($obj.Name ).Split('{')[0]
KeyID = (($obj.Name ).Split('{')[1]).TrimEnd('}')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment