Add-Type-AssemblyName System.Speech $speaker = [System.Speech.Synthesis.SpeechSynthesizer] $preInit $null = $Speaker.SpeakAsync(“Oh boy, that was a New Year’s party. I guess I need a little break.”)
functionTest-Stream { #region These are all the same and define return values 'Return Value 1' echo'Return Value 2' 'Return Value 3' | Write-Output #endregion
PS C:\> Test-Stream Return Value 1 Return Value 2 Return Value 3 Mandatory User Information WARNING: Warning Information Test-Stream : Error Information At line:1 char:1 + Test-Stream + ~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-Stream
PS C:\> $result = Test-Stream Mandatory User Information WARNING: Warning Information Test-Stream : Error Information At line:1 char:1 + Test-Stream + ~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-Stream
PS C:\> $result Return Value 1 Return Value 2 Return Value 3
PS C:\> Test-Stream Return Value 1 Return Value 2 Return Value 3 VERBOSE: Additional Information DEBUG: Developer Information Mandatory User Information Auxiliary Information
Since this is a native LDAP filter, you can even use it without the ActiveDirectory module, resorting to native .NET methods: 由于它是一个原生的 LDAP 过滤器,您甚至可以在没有 ActiveDirectory 模块的情况下以 .NET 原生的方式使用它。