external help file | Module Name | online version | schema |
---|---|---|---|
MyNumber-help.xml |
MyNumber |
2.0.0 |
Convert a numeric value.
Convert-MyNumber [-Number] <Double> [-ToBinary] [<CommonParameters>]
Convert-MyNumber [-Number] <Double> [-ToHex] [<CommonParameters>]
Convert-MyNumber [-Number] <Double> [-ToOctal] [<CommonParameters>]
Convert a numeric value to the specified format. The result will be a string.
PS C:\> Convert-MyNumber 123
1111011
The default behavior is to convert to binary.
PS C:\> 1024678 | Convert-MyNumber -ToHex
fa2a6
PS C:\> 1024678 | Convert-MyNumber -ToOctal
3721246
A numeric value to be converted.
Type: Double
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Convert the number to a binary string
Type: SwitchParameter
Parameter Sets: binary
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Convert the number to a hex string
Type: SwitchParameter
Parameter Sets: hex
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Convert the number to an Octal string
Type: SwitchParameter
Parameter Sets: octal
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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).
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/