ps/Modules/Cole.PowerShell.Developer/Public/ConvertTo-ASCII.ps1

10 lines
337 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function ConvertTo-ASCII {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Position = 0)]
[ValidateNotNullOrEmpty()]
$Text
)
return [System.Text.Encoding]::ASCII.GetString([System.Text.Encoding]::ASCII.GetBytes($Text))
}