String methods

Acronym
Acronym in PowerShell
Function Get-Acronym() {
    [CmdletBinding()]
    Param (
        [string]$Phrase
    )
    ( $Phrase -replace "[-_]"," " -split " " | Foreach-Object {$_[0].ToString().ToUpper()} ) -join ""
}

Get-Date cmdlet.

11th Sep 2024 · Found it useful?