Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 468 Bytes

File metadata and controls

12 lines (7 loc) · 468 Bytes

Prevent a script from running without the required module dependencies

Add the comment at the top of the script:

#Requires -Modules <Module-Name>

Running the script without the required modules available will cause an error and prevent the script from running.

See Microsoft Learn | About Requires