< Back

Test-IsPSCore

Sat Jan 18, 2020 7:20 pm

NAME Test-IsPSCore



SYNOPSIS

Tests if the the current session is running in PowerShell Core.





SYNTAX

Test-IsPSCore [<CommonParameters>]





DESCRIPTION

Tests if the the current session is running in PowerShell Core.





PARAMETERS

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.Boolean





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>if (Test-IsPSCore) { /* logic */ }















RELATED LINKS