Skip to content

singh2034/Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ PowerShell Execution Guide for Windows

This section provides instructions on how to execute PowerShell scripts (.ps1) on a Windows environment.


🚀 Execution Methods

1. Simple Right-Click

  • Locate your .ps1 file in File Explorer.
  • Right-click the file and select Run with PowerShell.

2. Execution via Terminal (Recommended)

Open PowerShell and call the script directly. Use quotes and an ampersand if your path contains spaces:

& "C:\Path\To\Your\Script.ps1"

⚠️ Troubleshooting: Execution Policy

By default, Windows restricts script execution. If you encounter an error regarding "running scripts is disabled," use one of the following commands to bypass the restriction:

Method Command
Current Session Only Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
One-Time Run powershell.exe -ExecutionPolicy Bypass -File "YourScript.ps1"

💡 Quick Tips

Admin Rights: If the script fails due to permissions, ensure you are running PowerShell as an Administrator.
Unblocking Files: If the script was downloaded from the web, right-click the file > Properties > Check Unblock > Apply.

About

Powershell for WIndows and Shell for Linux - Projects & Scripts for Enterprise use and for Learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors