public/Write-CustomWarningMessage.ps1
function Write-CustomWarningMessage { param( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$ParentPath, [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string]$FilePath ) process{ $ErrorActionPreference = 'Stop' $StringToUse = $FilePath.Split($ParentPath)[1] Write-Warning -Message "Processing: $StringToUse." } # process } # function |