PowerShell_Scripts/README.md

31 lines
1.4 KiB
Markdown
Raw Normal View History

# PowerShell Scripts
2020-09-16 10:56:03 -04:00
These are the scripts that go into $MyPSScriptRoot which is part of my $env:PATH.
The development of these is documented in my blog: https://blog.lksz.me
They are provided 'as is' for your review and for your reuse.
This envrionment can be installed using one the following options:
### The Short, yet safer way
```PowerShell
iwr https://lksz.me/pwsz | iex
```
2020-09-16 15:24:19 -04:00
This sets up the `$PROFILE` file, and initilizes the default dir, but nothing else is done.
Cloning the repo, is something you'll need to deal with on your own, or you can call the next line.
2020-09-16 15:24:19 -04:00
### The [prefered] Short, but with control option
```PowerShell
$sfw=1; iwr https://lksz.me/pwsz | iex; _setup [-sudo] [-Force] [-GitClone] [-GitURL <alternative git URL>] [-WhatIf] [-Confirm] [<CommonParameters>]
```
This will setup the `$PROFILE` file properly, and when the `-GitClone` switch is used, the git repo is cloned into `$MyPSScriptRoot`.
### The 'I don't trust one liners, what's going on ?!?' option
Follow the instructions in the initial [blog post](https://blog.lksz.me/keeping-track-of-everything/#-mypsscriptroot) which contains the steps for cloning and using the env as your own.
In the above one-liners, `https://lksz.me/pwsz` actually points to the [Setup-Profile.ps1] file, which means, that after you have the `Scripts` directory setup, you can all `Setup-Profile` to setup the `$PROFILE` file.