Licensing a script

Hello people,
Has anyone ever needed to “license” a script to run on a specific server? I am creating a series of scripts that will collect information from the network but I want to allow it to run only in certain environments.


Thank you in advance.

Typically, you are defining where a script executes, not necessarily running it on all servers and it executes on permitted servers, such as

Get-WmiObject -ComputerName 'Server1','Server2','Server3' -Class Win32_OperatingSystem

Would recommend you start with a book like Month of Lunches to understand the basic concepts before you start executing scripts in your environment

Hello Mr. Rob, thank you very much for your reply.

My idea is to get the system uuid and put it in a variable and compile the script into an EXE. When the user runs the script, they will check the UUID and compare it with the variable. Combine ok, it will run.