main.ps1 154 B

123456
  1. Get-ChildItem -Path "C:\scripts" -Filter "*.ps1" | ForEach-Object {
  2. if ($_.Name -notmatch "main.ps1") {
  3. Invoke-Expression $_.FullName
  4. }
  5. }