2018-10-01 09:49:43 +00:00
---
external help file: DSInternals.PowerShell.dll-Help.xml
Module Name: DSInternals
2018-10-14 12:10:18 +00:00
online version: https://github.com/MichaelGrafnetter/DSInternals/blob/master/Documentation/PowerShell/Get-BootKey.md
2018-10-01 09:49:43 +00:00
schema: 2.0.0
---
# Get-BootKey
## SYNOPSIS
2018-12-28 09:09:35 +00:00
Reads the Boot Key (AKA SysKey or System Key) from an online or offline SYSTEM registry hive.
2018-10-01 09:49:43 +00:00
## SYNTAX
### Offline
```
Get-BootKey [-SystemHiveFilePath] < String > [< CommonParameters > ]
```
### Online
```
Get-BootKey [-Online] [< CommonParameters > ]
```
## DESCRIPTION
2018-12-28 09:09:35 +00:00
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.
2018-10-01 09:49:43 +00:00
## EXAMPLES
### Example 1
```powershell
2018-12-28 09:09:35 +00:00
PS C:\> Get-BootKey -Online
```
Retrieves the BootKey from the currently running OS.
### Example 2
```powershell
PS C:\> reg.exe SAVE HKLM\SYSTEM C:\RegBackup\SYSTEM.hiv
PS C:\> Get-BootKey -SystemHiveFilePath C:\RegBackup\SYSTEM.hiv
2018-10-01 09:49:43 +00:00
```
2018-12-28 09:09:35 +00:00
Creates a backup of the SYSTEM registry hive and then retrieves the BootKey from this backup.
2018-10-01 09:49:43 +00:00
## PARAMETERS
### -Online
2018-12-28 09:09:35 +00:00
Specifies that the action is to be taken on the operating system that is currently running on the local computer.
2018-10-01 09:49:43 +00:00
```yaml
Type: SwitchParameter
Parameter Sets: Online
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SystemHiveFilePath
2018-12-28 09:09:35 +00:00
Path to an offline SYSTEM registry hive.
2018-10-01 09:49:43 +00:00
```yaml
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
## RELATED LINKS
2018-12-28 09:09:35 +00:00
[Get-ADDBAccount ](Get-ADDBAccount.md )
[Get-ADDBBackupKey ](Get-ADDBBackupKey.md )
[Set-ADDBAccountPassword ](Set-ADDBAccountPassword.md )
[Set-ADDBAccountPasswordHash ](Set-ADDBAccountPasswordHash.md )