Use cmdlets, native commands, functions, .NET, DLLs, Windows API and much more in a single “program”
Load a PowerShell script using dot sourcing:
. . C:\\Tools\\PowerView.ps1
A module (or a script) can be imported with:
Import-module c:\\Tools\\ADModule-Master\\ActiveDirectory\\ActiveDirectory.psd1
All the commands in a module can be listed with:
Get-Command -module <modulename>
It’s NOT a security measure, it is present to prevent user from accidently executing scripts.
There are several ways to bypass:
powershell -ExecutionPolicy bypass
$env:PSExecutionPolicyPreference="bypass"