This can be done with one line: ::OSVersion.Platform Prior to PowerShell version 6, this was only possible by asking. Platform Win32NT OS Microsoft Windows 3 PS C:\Users\LotPings> $PSVersionTable Change positional parameter for powershell.exe from -Command to -File.Update In v6.0.0-beta.3 there are some breaking changes: Since the PowerShell versions 6.1 on Windows/Linux/OSX went to GA you can use the new properties of $PSVersionTable, OS, Platform and GitCommitId
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |