How to Use PowerShell 7.1

Published: 16 February 2021
on channel: TechSnips by ATA Learning
913
22

Train thousands of people, up your skills and get that next awesome job by joining TechSnips and becoming an IT rockstar! https://techsnips.io/join-us

Have you ever run a script, only to be presented with severe red error messages about running as Administrator? Or have you wanted to ensure a script is run only on systems that have PowerShell modules of a certain version?

PowerShell 7.1 has expanded on the #Requires syntax by providing console output when the script running environment does not match the listed Required state. Using the available Requires parameters you can ensure your script is only run when the shell can meet strict (or loose) requirements. This includes only running while as an Administrator, in a particular PowerShell version, having a particular module present, or even requiring particular module versions.

https://docs.microsoft.com/en-us/powe...


Prerequisites include:
https://gist.github.com/davepinkawa/d...


Watch video How to Use PowerShell 7.1 online without registration, duration hours minute second in high quality. This video was added by user TechSnips by ATA Learning 16 February 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 913 once and liked it 22 people.