DSInternals/Documentation/PowerShell/Get-BootKey.md

2.3 KiB

external help file Module Name online version schema
DSInternals.PowerShell.dll-Help.xml DSInternals https://github.com/MichaelGrafnetter/DSInternals/blob/master/Documentation/PowerShell/Get-BootKey.md 2.0.0

Get-BootKey

SYNOPSIS

Reads the Boot Key (AKA SysKey or System Key) from an online or offline SYSTEM registry hive.

SYNTAX

Offline

Get-BootKey [-SystemHiveFilePath] <String> [<CommonParameters>]

Online

Get-BootKey [-Online] [<CommonParameters>]

DESCRIPTION

The BootKey/SysKey is an encryption key that is stored in the Windows SYSTEM registry hive. This key is used by several Windows components to encrypt sensitive information like the AD database, machine account password or system certificates etc.

The Boot Key is returned in hexadecimal format.

EXAMPLES

Example 1

PS C:\> Get-BootKey -Online

Retrieves the BootKey from the currently running OS.

Example 2

PS C:\> reg.exe SAVE HKLM\SYSTEM C:\RegBackup\SYSTEM.hiv
PS C:\> Get-BootKey -SystemHiveFilePath C:\RegBackup\SYSTEM.hiv

Creates a backup of the SYSTEM registry hive and then retrieves the BootKey from this backup.

PARAMETERS

-Online

Specifies that the action is to be taken on the operating system that is currently running on the local computer.

Type: SwitchParameter
Parameter Sets: Online
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SystemHiveFilePath

Path to an offline SYSTEM registry hive.

Type: String
Parameter Sets: Offline
Aliases: Path, FilePath, SystemHivePath, HivePath

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

None

OUTPUTS

System.String

NOTES

Get-ADDBAccount Get-ADDBBackupKey Set-ADDBAccountPassword Set-ADDBAccountPasswordHash