]> git.ardis.lu - ArdisUtilities/commitdiff
Add directions to pass -Persist to install.ps1
authorArdis Lu <ardisglu@gmail.com>
Tue, 30 Apr 2024 21:53:50 +0000 (14:53 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 30 Apr 2024 21:53:50 +0000 (14:53 -0700)
README.md

index 87249aaf61390b443978bd37060ff4777c459668..b788ce71c1a06448193757572fade5a041d54c81 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,15 +8,27 @@ Requires [PowerShell 7+](https://github.com/PowerShell/PowerShell), which is [di
 
 ### Using `install.ps1`
 
-The `install.ps1` script will download the module to a temporary folder then use [`Import-Module`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/import-module) to add the module to the **current session** only. To keep the module installed on future sessions, see [Persistence](https://github.com/ardislu/ArdisUtilities#persistence).
+Use `install.ps1` to install or upgrade `ArdisUtilities`.
+
+By default, the module is added to the **current session** only:
 
 ```PowerShell
-iwr 'https://raw.githubusercontent.com/ardislu/ArdisUtilities/main/install.ps1' | iex
+# ArdisUtilities will only be available for the current session
+irm 'https://raw.githubusercontent.com/ardislu/ArdisUtilities/main/install.ps1' | iex
 ```
 
+To keep the module installed on future sessions, pass the `-Persist` parameter:
+
+```PowerShell
+# ArdisUtilities will be installed to $HOME/Documents/PowerShell/Modules
+"& { $(irm https://raw.githubusercontent.com/ardislu/ArdisUtilities/main/install.ps1) } -Persist" | iex
+```
+
+To uninstall, delete the `ArdisUtilities` folder within `$HOME/Documents/PowerShell/Modules`.
+
 ### Manual
 
-You can also add the module to the current session manually by following these steps:
+You can add the module to the current session manually by following these steps:
 
 1. Download the `ArdisUtilities` folder
 
@@ -26,8 +38,6 @@ You can also add the module to the current session manually by following these s
 Import-Module ./path/to/ArdisUtilities/
 ```
 
-### Persistence
-
 To persist this module on new sessions:
 - Copy the `ArdisUtilities` folder to any folder on `$env:PSModulePath` ([reference](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_psmodulepath)), or
 - Register this module using [`Register-PSRepository`](https://learn.microsoft.com/en-us/powershell/module/powershellget/register-psrepository) then install the module using [`Install-Module`](https://learn.microsoft.com/en-us/powershell/module/powershellget/install-module) ([reference](https://stackoverflow.com/questions/49987884/how-to-install-update-a-powershell-module-from-a-local-folder-set-up-an-intern)), or
This page took 0.032983 seconds and 4 git commands to generate.