< Back
ConvertFrom-OIDString
Post
NAME ConvertFrom-OIDString
SYNOPSIS
Creates a byte array from an OID string.
SYNTAX
ConvertFrom-OIDString [-OID] <String> [<CommonParameters>]
DESCRIPTION
This cmdlet take an OID string in an X.Y.Z.W format and produces a byte array that is used
to represent the OID.
PARAMETERS
-OID <String>
The OID string to convert to bytes.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
System.Byte[]
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/22/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Bytes = ConvertFrom-OIDString -OID "1.2.840.113549.1.1.1"
The contents of $Bytes is (in decimal): 42 134 72 134 247 13 1 1 1
In hex the contents are: 2A 86 48 86 F7 0D 01 01 01
This is the RSA Encryption OID.
RELATED LINKS
SYNOPSIS
Creates a byte array from an OID string.
SYNTAX
ConvertFrom-OIDString [-OID] <String> [<CommonParameters>]
DESCRIPTION
This cmdlet take an OID string in an X.Y.Z.W format and produces a byte array that is used
to represent the OID.
PARAMETERS
-OID <String>
The OID string to convert to bytes.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
OUTPUTS
System.Byte[]
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/22/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$Bytes = ConvertFrom-OIDString -OID "1.2.840.113549.1.1.1"
The contents of $Bytes is (in decimal): 42 134 72 134 247 13 1 1 1
In hex the contents are: 2A 86 48 86 F7 0D 01 01 01
This is the RSA Encryption OID.
RELATED LINKS