Branch | CodeBuild (Windows) | CodeBuild (Linux) | Read the Docs |
---|---|---|---|
master | |||
development | --- |
Convert is a comprehensive PowerShell module that simplifies object conversions by providing a consistent, intuitive interface for common data transformation tasks. Whether you're working with Base64 encoding, memory streams, byte arrays, hash functions, or time conversions, this module eliminates the need to remember complex .NET methods or write custom conversion logic.
- Simplified Syntax: Convert complex .NET operations into simple, memorable PowerShell commands
- Cross-Platform: Works seamlessly across Windows, Linux, and macOS
- Pipeline Support: Most functions accept pipeline input for easy integration into larger scripts
Install from the PowerShell Gallery:
# Install for current user
Install-Module -Name Convert -Scope CurrentUser
# Install for all users (requires admin)
Install-Module -Name Convert -Scope AllUsers
Verify the module is installed correctly:
Get-Command -Module Convert
ConvertFrom-Base64
- Converts a Base64 encoded string to the specified output typeConvertFrom-Base64ToByteArray
- Converts a Base64 encoded string to a byte arrayConvertFrom-Base64ToMemoryStream
- Converts a Base64 encoded string to a MemoryStream objectConvertFrom-Base64ToString
- Converts a Base64 encoded string to a stringConvertFrom-ByteArrayToBase64
- Converts a byte array to a Base64 encoded stringConvertFrom-StringToBase64
- Converts a string to a Base64 encoded stringConvertTo-Base64
- Converts an object to a Base64 encoded string
ConvertFrom-ByteArrayToMemoryStream
- Converts a byte array to a MemoryStream objectConvertFrom-MemoryStream
- Converts a MemoryStream to the specified output typeConvertFrom-MemoryStreamToBase64
- Converts a MemoryStream to a Base64 encoded stringConvertFrom-MemoryStreamToByteArray
- Converts a MemoryStream to a byte arrayConvertFrom-MemoryStreamToSecureString
- Converts a MemoryStream to a SecureString objectConvertFrom-MemoryStreamToString
- Converts a MemoryStream to a stringConvertFrom-StringToMemoryStream
- Converts a string to a MemoryStream objectConvertTo-MemoryStream
- Converts an object to a MemoryStream object
ConvertFrom-StringToByteArray
- Converts a string to a byte arrayConvertFrom-StringToCompressedByteArray
- Converts a string to a compressed byte arrayConvertFrom-CompressedByteArrayToString
- Converts a compressed byte array to a stringConvertTo-String
- Converts an object to a stringConvertTo-TitleCase
- Converts a string to title case
ConvertTo-Hash
- Computes a hash from the input dataConvertTo-HmacHash
- Computes a Hash-based Message Authentication Code (HMAC)
ConvertFrom-UnixTime
- Converts a Unix timestamp to a DateTime objectConvertTo-UnixTime
- Converts a DateTime object to a Unix timestampGet-UnixTime
- Gets the current Unix timestamp
ConvertFrom-EscapedUrl
- Converts an escaped URL to a normal URLConvertTo-EscapedUrl
- Converts a URL to an escaped URL
ConvertTo-Celsius
- Converts a temperature from Fahrenheit to CelsiusConvertTo-Fahrenheit
- Converts a temperature from Celsius to Fahrenheit
ConvertFrom-Clixml
- Converts a CliXml string to an objectConvertTo-Clixml
- Converts an object to a CliXml stringConvertFrom-HashTable
- Converts a hashtable to a custom object
- PowerShell 5.1 or PowerShell 7.x
- Compatible with both PowerShell 7.x and Windows PowerShell 5.1
- Cross-platform support:
- Windows
- Linux
- macOS
# View module help
Get-Help Convert
# View help for a specific function
Get-Help ConvertTo-Base64 -Full