Creates a machine key element.
Syntax
Parameter Set: Default
New-MgmtSvcMachineKey [-Base64] [-Decryption <String> ]
[-DecryptionKeySize <Int32> ] [-Validation <String> ] [
<CommonParameters>]
The New-MachineKey cmdlet creates a <machineKey> configuration element for use in the web.config file. The Initialize-MgmtSvcFeature cmdlet calls this cmdlet to generate the initial keys stored during configuration.
A machine key can be a validation key to confirm the integrity of data, or a decryption key to encrypt or decrypt forms authentication data. This cmdlet generates a value in memory. It is recommended that you periodically rotate the machine keys. For example, once per year.
Indicates that the validation and decryption values are Base64 encoded.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies an algorithm to encrypt and decrypt forms authentication data.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a key size, in bits, of the algorithm used to encrypt and decrypt forms authentication data.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a hash algorithm used to validate data.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
This command creates a machine key configuration element by using the Hash-based Message Authentication Code (HMAC) SHA256 (HMACSHA256) for validation and the Advanced Encryption Standard (AES) encryption method for decryption.
PS C:\> ([xml](New-MgmtSvcMachineKey)).OuterXml