Updated the manuals

This commit is contained in:
Markus Fleschutz
2024-08-15 09:51:46 +02:00
parent 654d1a18d0
commit e1ffab5509
633 changed files with 2120 additions and 973 deletions

View File

@ -1,7 +1,7 @@
Script: *update-powershell-profile.ps1*
========================
This PowerShell script write/overwrites the PowerShell profile for the current user.
This PowerShell script write/overwrites the PowerShell profile of the current user.
Parameters
----------
@ -26,9 +26,9 @@ Example
-------
```powershell
PS> ./update-powershell-profile.ps1
(1/2) Query location of PowerShell profile 'CurrentUserCurrentHost'...
(2/2) Copy my-profile.ps1 to C:\Users\Markus\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1...
Your PowerShell profile is updated - it get's active on next login.
(1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'...
(2/2) Copying my-profile.ps1 to /home/Markus/.config/powershell/Microsoft.PowerShell_profile.ps1...
PowerShell profile updated - it get's active on next login.
```
@ -45,16 +45,16 @@ Script Content
```powershell
<#
.SYNOPSIS
Updates the PowerShell profile
Updates the user's PowerShell profile
.DESCRIPTION
This PowerShell script write/overwrites the PowerShell profile for the current user.
This PowerShell script write/overwrites the PowerShell profile of the current user.
.PARAMETER path
Specifies the path to the new profile ($PSScriptRoot/my-profile.ps1 by default)
.EXAMPLE
PS> ./update-powershell-profile.ps1
⏳ (1/2) Query location of PowerShell profile 'CurrentUserCurrentHost'...
⏳ (2/2) Copy my-profile.ps1 to C:\Users\Markus\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1...
✔️ Your PowerShell profile is updated - it get's active on next login.
⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'...
⏳ (2/2) Copying my-profile.ps1 to /home/Markus/.config/powershell/Microsoft.PowerShell_profile.ps1...
✔️ PowerShell profile updated - it get's active on next login.
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -64,15 +64,15 @@ Script Content
param([string]$path = "$PSScriptRoot/my-profile.ps1")
try {
"⏳ (1/2) Query location of PowerShell profile 'CurrentUserCurrentHost'..."
"⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'..."
$pathToProfile = $PROFILE.CurrentUserCurrentHost
$filename = (Get-Item "$path").Name
"⏳ (2/2) Copy $filename to $pathToProfile..."
"⏳ (2/2) Copying $filename to $pathToProfile..."
$null = New-Item -Path $pathToProfile -ItemType "file" -Force
Copy-Item "$path" "$pathToProfile" -force
"✔️ Your PowerShell profile is updated - it get's active on next login."
"✔️ PowerShell profile updated - it get's active on next login."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -80,4 +80,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of update-powershell-profile.ps1 as of 05/19/2024 10:25:27)*
*(generated by convert-ps2md.ps1 using the comment-based help of update-powershell-profile.ps1 as of 08/15/2024 09:50:55)*