https://github.com/jaimeloeuf/scripts
Repo for all my shell scripts. Contains shell scripts for shells like PowerShell, Bash and more.
https://github.com/jaimeloeuf/scripts
powershell powershell-scripts
Last synced: 12 months ago
JSON representation
Repo for all my shell scripts. Contains shell scripts for shells like PowerShell, Bash and more.
- Host: GitHub
- URL: https://github.com/jaimeloeuf/scripts
- Owner: Jaimeloeuf
- License: mit
- Created: 2019-05-17T15:44:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-15T09:00:16.000Z (over 6 years ago)
- Last Synced: 2025-01-12T16:09:49.741Z (about 1 year ago)
- Topics: powershell, powershell-scripts
- Language: PowerShell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scripts
Repo for all my scripts.
There will be a simple readme at the start of all script files to describe the script.
If a script is made up of multiple files, then they will be in the same directory with a standalone README file.
## How to run powershell scripts
Before you can execute and run any of the powershell scripts, you must make sure that you set the execution policy.
The execution policy on your system determines what are the scripts that you can and cannot run.
The list of execution policies are:
- Restricted
- Stops all scripts from running. Usually the Default on most systems.
- RemoteSigned
- Runs scripts created on the device, and Scripts created on other computers signed by a trusted publisher.
- AllSigned
- All the scripts will run as long as they've been signed by a trusted publisher.
- Unrestricted
- Allow all scripts to run, without any restrictions
---
Alot of times the scripts you wrote yourself and or downloaded from the internet from individual publishers like me are not considered to be signed by a trusted provider. Thus the only execution policy that will allow you to run these scripts is the "Unrestricted" policy.
To set a execution policy:
```ps
<# Using Unrestricted policy as an example #>
Set-ExecutionPolicy Unrestricted
```
If the above command fails with an error, it is most likey due to lack of privileges to set the policy. In that case, when you lack the user privileges to set execution policy for your system, or perhaps if you just want to set the execution policy for your current user, then you should include parameter to indicate the scope of users that will be affacted by the policy set.
To set policy with a specified scope:
```ps
<# Setting policy for just the current user #>
Set-ExecutionPolicy -Scope CurrentUser Unrestricted
```
With the above command executed, it should finish silently. With that you are now ready to run your scripts!
For more info on installing your scripts, getting it to run and where to install them, refer to the links below:
-
-
---
## LICENSE
All scripts in this repo is available for free under the MIT License.
Although be sure to use it at your own risk.