PowerShell scripting with NTLite

Dav1

Member
Hello friends

I'm a bit of a beginner in this area.

I would like to install a powershell script with NTLITE but I do not know the procedure to follow, so that it executes it for me during a windows installation.

"Place the script and the folder .......as well as the commands for it to run".

Should I insert the command for restrictions to run scripts "Set-ExecutionPolicy Unrestricted"

This is a script to copy a directory to a location.

When I run it manually in windows it works fine.

I looked everywhere on the forum, I did not find an answer to my request, thank you for the help you will bring me.
 
Last edited:
1. Every *.ps1 file is executed by NTLite with parameters "-NoProfile -ExecutionPolicy Bypass"
2. When you add a powershell.exe command, no parameters are added for you. Do it yourself.
3. "-nop -ep bypass" is a faster shortcut.

4. Post-Setup (Machine) actions run as SYSTEM. If you don't use absolute pathnames, everything will be relative to \Windows\System32 folder.
5. Post-Setup (User) actions run as your user account, but with Admin rights.
 
Back
Top