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.

6th Nov 2024 · Found it useful?