mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-23 10:28:23 +02:00
Update the manual pages
This commit is contained in:
parent
209fda3588
commit
46dae1445a
@ -4,7 +4,7 @@ This PowerShell script adds firewall rules for the given executable. Administrat
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/add-firewall-rules.ps1 [[-PathToExecutables] <String>] [<CommonParameters>]
|
add-firewall-rules.ps1 [[-PathToExecutables] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-PathToExecutables <String>
|
-PathToExecutables <String>
|
||||||
Specifies the path to the executables
|
Specifies the path to the executables
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script saves the given memo text to Memos.csv in your home folde
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/add-memo.ps1 [[-text] <String>] [<CommonParameters>]
|
add-memo.ps1 [[-text] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-text <String>
|
-text <String>
|
||||||
Specifies the text to memorize
|
Specifies the text to memorize
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script handles and escalates the given alert message.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/alert.ps1 [[-Message] <String>] [<CommonParameters>]
|
alert.ps1 [[-Message] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Message <String>
|
-Message <String>
|
||||||
Specifies the alert message
|
Specifies the alert message
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script builds a repository by supporting: cmake, configure, auto
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/build-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
|
build-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-RepoDir <String>
|
-RepoDir <String>
|
||||||
Specifies the path to the Git repository
|
Specifies the path to the Git repository
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script builds all Git repositories in a folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/build-repos.ps1 [[-ParentDir] <String>] [<CommonParameters>]
|
build-repos.ps1 [[-ParentDir] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-ParentDir <String>
|
-ParentDir <String>
|
||||||
Specifies the path to the parent folder
|
Specifies the path to the parent folder
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's autostart fol
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-autostart.ps1 [<CommonParameters>]
|
cd-autostart.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the crash dumps director
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-crashdumps.ps1 [<CommonParameters>]
|
cd-crashdumps.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's desktop folde
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-desktop.ps1 [<CommonParameters>]
|
cd-desktop.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the documents folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-docs.ps1 [<CommonParameters>]
|
cd-docs.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's downloads fol
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-downloads.ps1 [<CommonParameters>]
|
cd-downloads.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's Dropbox folde
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-dropbox.ps1 [<CommonParameters>]
|
cd-dropbox.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
61
Docs/cd-etc.md
Normal file
61
Docs/cd-etc.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
## The *cd-etc.ps1* Script
|
||||||
|
|
||||||
|
This PowerShell script changes the working directory to the /etc directory.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
cd-etc.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./cd-etc
|
||||||
|
📂C:\Windows\System32\drivers\etc
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
|
||||||
|
## Related Links
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
```powershell
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Changes to the /etc directory
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script changes the working directory to the /etc directory.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./cd-etc
|
||||||
|
📂C:\Windows\System32\drivers\etc
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ($IsLinx) {
|
||||||
|
$Path = "/etc"
|
||||||
|
} else {
|
||||||
|
$Path = Resolve-Path "$env:WINDIR\System32\drivers\etc"
|
||||||
|
}
|
||||||
|
if (-not(Test-Path "$Path" -pathType container)) {
|
||||||
|
throw "/etc directory at 📂$Path doesn't exist (yet)"
|
||||||
|
}
|
||||||
|
Set-Location "$Path"
|
||||||
|
"📂$Path"
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*Generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1*
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the fonts folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-fonts.ps1 [<CommonParameters>]
|
cd-fonts.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's home director
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-home.ps1 [<CommonParameters>]
|
cd-home.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
48
Docs/cd-logs.md
Normal file
48
Docs/cd-logs.md
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
## The *cd-logs.ps1* Script
|
||||||
|
|
||||||
|
cd-logs.ps1
|
||||||
|
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
```powershell
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Sets the working directory to the logs folder
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script changes the current working directory to the logs directory.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./cd-logs
|
||||||
|
📂/var/logs
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
function GetLogsDir {
|
||||||
|
if ($IsLinux) { return "/var/logs" }
|
||||||
|
$WinDir = [System.Environment]::GetFolderPath('Windows')
|
||||||
|
return "$WinDir\Logs"
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$Path = GetLogsDir
|
||||||
|
Set-Location "$Path"
|
||||||
|
"📂$Path"
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*Generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1*
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's music folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-music.ps1 [<CommonParameters>]
|
cd-music.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's OneDrive fold
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-onedrive.ps1 [<CommonParameters>]
|
cd-onedrive.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's pictures fold
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-pics.ps1 [<CommonParameters>]
|
cd-pics.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the Public folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-public.ps1 [<CommonParameters>]
|
cd-public.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's Git repositor
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-repos.ps1 [[-Subpath] <String>] [<CommonParameters>]
|
cd-repos.ps1 [[-Subpath] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Subpath <String>
|
-Subpath <String>
|
||||||
Specifies an additional relative subpath (optional)
|
Specifies an additional relative subpath (optional)
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the current working directory to the root directo
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-root.ps1 [<CommonParameters>]
|
cd-root.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the PowerShell scripts f
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-scripts.ps1 [<CommonParameters>]
|
cd-scripts.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's SSH folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-ssh.ps1 [<CommonParameters>]
|
cd-ssh.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the templates folder.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-templates.ps1 [<CommonParameters>]
|
cd-templates.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to one directory level up.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-up.ps1 [<CommonParameters>]
|
cd-up.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to two directory level up.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-up2.ps1 [<CommonParameters>]
|
cd-up2.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to three directory levels u
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-up3.ps1 [<CommonParameters>]
|
cd-up3.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to four directory levels up
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-up4.ps1 [<CommonParameters>]
|
cd-up4.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the users directory.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-users.ps1 [<CommonParameters>]
|
cd-users.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's videos folder
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-videos.ps1 [<CommonParameters>]
|
cd-videos.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the Windows directory.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/cd-windows.ps1 [<CommonParameters>]
|
cd-windows.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script downloads a random photo from Unsplash and sets it as des
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/change-wallpaper.ps1 [[-Category] <String>] [<CommonParameters>]
|
change-wallpaper.ps1 [[-Category] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Category <String>
|
-Category <String>
|
||||||
Specifies the photo category (beach, city, ...)
|
Specifies the photo category (beach, city, ...)
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the application status and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-apps.ps1 [<CommonParameters>]
|
check-apps.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
@ -42,7 +42,8 @@ https://github.com/fleschutz/PowerShell
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
# TODO
|
$NumSnaps = (snap list).Count - 1
|
||||||
|
Write-Host "✅ $($NumSnaps) snaps installed"
|
||||||
} else {
|
} else {
|
||||||
Write-Progress "⏳ Querying installed apps and updates..."
|
Write-Progress "⏳ Querying installed apps and updates..."
|
||||||
$Apps = Get-AppxPackage
|
$Apps = Get-AppxPackage
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the status of the system battery and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-battery.ps1 [<CommonParameters>]
|
check-battery.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the BIOS status and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-bios.ps1 [<CommonParameters>]
|
check-bios.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
@ -14,7 +14,7 @@ This PowerShell script queries the BIOS status and prints it.
|
|||||||
## Example
|
## Example
|
||||||
```powershell
|
```powershell
|
||||||
PS> ./check-bios
|
PS> ./check-bios
|
||||||
✅ BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760)
|
✅ BIOS 'F6', release ALASKA - 1072009, S/N NXA82EV0EBB0760 by American Megatrends Inc.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ https://github.com/fleschutz/PowerShell
|
|||||||
This PowerShell script queries the BIOS status and prints it.
|
This PowerShell script queries the BIOS status and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-bios
|
PS> ./check-bios
|
||||||
✅ BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760)
|
✅ BIOS 'F6', release ALASKA - 1072009, S/N NXA82EV0EBB0760 by American Megatrends Inc.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -52,14 +52,14 @@ try {
|
|||||||
}
|
}
|
||||||
Write-Progress -completed "."
|
Write-Progress -completed "."
|
||||||
} else {
|
} else {
|
||||||
Write-Progress "⏳ Querying BIOS..."
|
# Write-Progress "⏳ Querying BIOS..."
|
||||||
$BIOS = Get-CimInstance -ClassName Win32_BIOS
|
$BIOS = Get-CimInstance -ClassName Win32_BIOS
|
||||||
$Model = $BIOS.Name.Trim()
|
$Model = $BIOS.Name.Trim()
|
||||||
$Manufacturer = $BIOS.Manufacturer.Trim()
|
$Manufacturer = $BIOS.Manufacturer.Trim()
|
||||||
$Serial = $BIOS.SerialNumber.Trim()
|
$Serial = $BIOS.SerialNumber.Trim()
|
||||||
$Version = $BIOS.Version.Trim()
|
$Version = $BIOS.Version.Trim()
|
||||||
Write-Progress -completed "."
|
# Write-Progress -completed "."
|
||||||
Write-Host "✅ BIOS $Model by $Manufacturer (version $Version, S/N $Serial)"
|
Write-Host "✅ BIOS '$Model', release $Version, S/N $Serial by $Manufacturer"
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -67,10 +67,10 @@ try {
|
|||||||
$Temp = "no temp"
|
$Temp = "no temp"
|
||||||
} elseif ($Celsius -gt 50) {
|
} elseif ($Celsius -gt 50) {
|
||||||
$Temp = "$($Celsius)°C"
|
$Temp = "$($Celsius)°C"
|
||||||
$Status = "⚠"
|
$Status = "⚠️"
|
||||||
} elseif ($Celsius -lt 0) {
|
} elseif ($Celsius -lt 0) {
|
||||||
$Temp = "$($Celsius)°C"
|
$Temp = "$($Celsius)°C"
|
||||||
$Status = "⚠"
|
$Status = "⚠️"
|
||||||
} else {
|
} else {
|
||||||
$Temp = "$($Celsius)°C"
|
$Temp = "$($Celsius)°C"
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script determines and speaks the current day by text-to-speech (
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-day.ps1 [<CommonParameters>]
|
check-day.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script measures and prints the DNS resolution speed by using 200
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-dns.ps1 [<CommonParameters>]
|
check-dns.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks a drive for free space left (20 GB by default).
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-drive-space.ps1 [[-Drive] <String>] [[-MinLevel] <Int32>] [<CommonParameters>]
|
check-drive-space.ps1 [[-Drive] <String>] [[-MinLevel] <Int32>] [<CommonParameters>]
|
||||||
|
|
||||||
-Drive <String>
|
-Drive <String>
|
||||||
Specifies the drive to check
|
Specifies the drive to check
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks all drives for free space left.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-drives.ps1 [[-MinLevel] <Int32>] [<CommonParameters>]
|
check-drives.ps1 [[-MinLevel] <Int32>] [<CommonParameters>]
|
||||||
|
|
||||||
-MinLevel <Int32>
|
-MinLevel <Int32>
|
||||||
Specifies the minimum warning level (10 GB by default)
|
Specifies the minimum warning level (10 GB by default)
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the time until Easter Sunday and replies by text-t
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-easter-sunday.ps1 [<CommonParameters>]
|
check-easter-sunday.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the file system of a drive. It needs admin rights.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-file-system.ps1 [[-Drive] <String>] [<CommonParameters>]
|
check-file-system.ps1 [[-Drive] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Drive <String>
|
-Drive <String>
|
||||||
Specifies the drive to check
|
Specifies the drive to check
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script determines and prints the file type of the given file.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-file.ps1 [[-Path] <String>] [<CommonParameters>]
|
check-file.ps1 [[-Path] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Path <String>
|
-Path <String>
|
||||||
Specifies the path to the file
|
Specifies the path to the file
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the status of the firewall and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-firewall.ps1 [<CommonParameters>]
|
check-firewall.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
60
Docs/check-hardware.md
Normal file
60
Docs/check-hardware.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
## The *check-hardware.ps1* Script
|
||||||
|
|
||||||
|
This PowerShell script queries the hardware details of the local computer and prints it.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
check-hardware.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./check-hardware.ps1
|
||||||
|
|
||||||
|
H A R D W A R E
|
||||||
|
✅ Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1°C)
|
||||||
|
...
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
|
||||||
|
## Related Links
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
```powershell
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Checks the hardware
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script queries the hardware details of the local computer and prints it.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./check-hardware.ps1
|
||||||
|
|
||||||
|
H A R D W A R E
|
||||||
|
✅ Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1°C)
|
||||||
|
...
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
" "
|
||||||
|
& "$PSScriptRoot/write-green.ps1" " H A R D W A R E"
|
||||||
|
& "$PSScriptRoot/check-cpu.ps1"
|
||||||
|
& "$PSScriptRoot/check-ram.ps1"
|
||||||
|
& "$PSScriptRoot/check-gpu.ps1"
|
||||||
|
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||||
|
& "$PSScriptRoot/check-drives.ps1"
|
||||||
|
& "$PSScriptRoot/check-battery.ps1"
|
||||||
|
exit 0 # success
|
||||||
|
```
|
||||||
|
|
||||||
|
*Generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1*
|
@ -1,10 +1,10 @@
|
|||||||
## The *check-health.ps1* Script
|
## The *check-health.ps1* Script
|
||||||
|
|
||||||
This PowerShell script checks and prints the system health of the local computer.
|
This PowerShell script queries the system health of the local computer (hardware, software, and network) and prints it.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-health.ps1 [<CommonParameters>]
|
check-health.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
@ -13,7 +13,8 @@ This PowerShell script checks and prints the system health of the local computer
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
```powershell
|
```powershell
|
||||||
PS> ./check-health
|
PS> ./check-health.ps1
|
||||||
|
|
||||||
H A R D W A R E
|
H A R D W A R E
|
||||||
✅ Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1°C)
|
✅ Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1°C)
|
||||||
...
|
...
|
||||||
@ -32,9 +33,10 @@ https://github.com/fleschutz/PowerShell
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Checks the system health
|
Checks the system health
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script checks and prints the system health of the local computer.
|
This PowerShell script queries the system health of the local computer (hardware, software, and network) and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-health
|
PS> ./check-health.ps1
|
||||||
|
|
||||||
H A R D W A R E
|
H A R D W A R E
|
||||||
✅ Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1°C)
|
✅ Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1°C)
|
||||||
...
|
...
|
||||||
@ -44,30 +46,9 @@ https://github.com/fleschutz/PowerShell
|
|||||||
Author: Markus Fleschutz | License: CC0
|
Author: Markus Fleschutz | License: CC0
|
||||||
#>
|
#>
|
||||||
|
|
||||||
" "
|
& "$PSScriptRoot/check-hardware.ps1"
|
||||||
& "$PSScriptRoot/write-green.ps1" " H A R D W A R E"
|
& "$PSScriptRoot/check-software.ps1"
|
||||||
& "$PSScriptRoot/check-cpu.ps1"
|
& "$PSScriptRoot/check-network.ps1"
|
||||||
& "$PSScriptRoot/check-ram.ps1"
|
|
||||||
& "$PSScriptRoot/check-gpu.ps1"
|
|
||||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
|
||||||
& "$PSScriptRoot/check-drives.ps1"
|
|
||||||
& "$PSScriptRoot/check-battery.ps1"
|
|
||||||
" "
|
|
||||||
& "$PSScriptRoot/write-green.ps1" " S O F T W A R E"
|
|
||||||
& "$PSScriptRoot/check-bios.ps1"
|
|
||||||
& "$PSScriptRoot/check-os.ps1"
|
|
||||||
& "$PSScriptRoot/check-powershell.ps1"
|
|
||||||
& "$PSScriptRoot/check-apps.ps1"
|
|
||||||
& "$PSScriptRoot/check-uptime.ps1"
|
|
||||||
& "$PSScriptRoot/check-time-zone.ps1"
|
|
||||||
& "$PSScriptRoot/check-swap-space.ps1"
|
|
||||||
& "$PSScriptRoot/check-pending-reboot.ps1"
|
|
||||||
" "
|
|
||||||
& "$PSScriptRoot/write-green.ps1" " N E T W O R K"
|
|
||||||
& "$PSScriptRoot/check-firewall"
|
|
||||||
& "$PSScriptRoot/check-ping.ps1"
|
|
||||||
& "$PSScriptRoot/check-dns.ps1"
|
|
||||||
& "$PSScriptRoot/check-vpn.ps1"
|
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the time until Indepence Day and replies by text-t
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-independence-day.ps1 [<CommonParameters>]
|
check-independence-day.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the given IPv4 address for validity.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-ipv4-address.ps1 [[-Address] <String>] [<CommonParameters>]
|
check-ipv4-address.ps1 [[-Address] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Address <String>
|
-Address <String>
|
||||||
Specifies the IPv4 address to check
|
Specifies the IPv4 address to check
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the given IPv6 address for validity
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-ipv6-address.ps1 [[-Address] <String>] [<CommonParameters>]
|
check-ipv6-address.ps1 [[-Address] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Address <String>
|
-Address <String>
|
||||||
Specifies the IPv6 address to check
|
Specifies the IPv6 address to check
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the position of the International Space Station (
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-iss-position.ps1 [<CommonParameters>]
|
check-iss-position.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -5,7 +5,7 @@ Supported MAC address formats are: 00:00:00:00:00:00 or 00-00-00-00-00-00 or 000
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-mac-address.ps1 [[-MAC] <String>] [<CommonParameters>]
|
check-mac-address.ps1 [[-MAC] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-MAC <String>
|
-MAC <String>
|
||||||
Specifies the MAC address to check
|
Specifies the MAC address to check
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script determines and speaks the current month name by text-to-s
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-month.ps1 [<CommonParameters>]
|
check-month.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script determines the Moon phase and answers by text-to-speech (
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-moon-phase.ps1 [<CommonParameters>]
|
check-moon-phase.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
60
Docs/check-network.md
Normal file
60
Docs/check-network.md
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
## The *check-network.ps1* Script
|
||||||
|
|
||||||
|
This PowerShell script queries the network details of the local computer and prints it.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
check-network.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./check-network.ps1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
N E T W O R K
|
||||||
|
✅ Firewall enabled
|
||||||
|
...
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
|
||||||
|
## Related Links
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
```powershell
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Checks the network details
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script queries the network details of the local computer and prints it.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./check-network.ps1
|
||||||
|
|
||||||
|
N E T W O R K
|
||||||
|
✅ Firewall enabled
|
||||||
|
...
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
" "
|
||||||
|
& "$PSScriptRoot/write-green.ps1" " N E T W O R K"
|
||||||
|
& "$PSScriptRoot/check-firewall"
|
||||||
|
& "$PSScriptRoot/check-ping.ps1"
|
||||||
|
& "$PSScriptRoot/check-dns.ps1"
|
||||||
|
& "$PSScriptRoot/check-vpn.ps1"
|
||||||
|
exit 0 # success
|
||||||
|
```
|
||||||
|
|
||||||
|
*Generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1*
|
@ -4,7 +4,7 @@ This PowerShell script checks the time until New Year and replies by text-to-spe
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-new-year.ps1 [<CommonParameters>]
|
check-new-year.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the operating system status and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-os.ps1 [<CommonParameters>]
|
check-os.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the inbox of Outlook for new/unread mails.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-outlook.ps1 [<CommonParameters>]
|
check-outlook.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the security status of the given password by havei
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-password.ps1 [[-password] <String>] [<CommonParameters>]
|
check-password.ps1 [[-password] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-password <String>
|
-password <String>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ check-pending-reboot.ps1
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Check for pending reboots
|
Check for pending reboots
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script queries pending reboots and prints it.
|
This PowerShell script queries pending operating system reboots and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
./check-pending-reboot.ps1
|
./check-pending-reboot.ps1
|
||||||
.LINK
|
.LINK
|
||||||
@ -40,23 +40,24 @@ try {
|
|||||||
$Reason = ""
|
$Reason = ""
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
if (Test-Path "/var/run/reboot-required") {
|
if (Test-Path "/var/run/reboot-required") {
|
||||||
$Reason = "found /var/run/reboot-required"
|
$Reason = "found: /var/run/reboot-required"
|
||||||
|
Write-Host "⚠️ Pending reboot ($Reason)"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") {
|
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") {
|
||||||
$Reason += ", '...\WindowsUpdate\Auto Update\RebootRequired'"
|
$Reason += ", ...\Auto Update\RebootRequired"
|
||||||
}
|
}
|
||||||
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting") {
|
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting") {
|
||||||
$Reason += ", '...\WindowsUpdate\Auto Update\PostRebootReporting'"
|
$Reason += ", ...\Auto Update\PostRebootReporting"
|
||||||
}
|
}
|
||||||
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") {
|
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") {
|
||||||
$Reason += ", '...\Component Based Servicing\RebootPending'"
|
$Reason += ", ...\Component Based Servicing\RebootPending"
|
||||||
}
|
}
|
||||||
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts") {
|
if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts") {
|
||||||
$Reason += ", '...\ServerManager\CurrentRebootAttempts'"
|
$Reason += ", ...\ServerManager\CurrentRebootAttempts"
|
||||||
}
|
}
|
||||||
if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "RebootInProgress") {
|
if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "RebootInProgress") {
|
||||||
$Reason += ", '...\CurrentVersion\Component Based Servicing' with 'RebootInProgress'"
|
$Reason += ", ...\CurrentVersion\Component Based Servicing with 'RebootInProgress'"
|
||||||
}
|
}
|
||||||
if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "PackagesPending") {
|
if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "PackagesPending") {
|
||||||
$Reason += ", '...\CurrentVersion\Component Based Servicing' with 'PackagesPending'"
|
$Reason += ", '...\CurrentVersion\Component Based Servicing' with 'PackagesPending'"
|
||||||
@ -73,10 +74,11 @@ try {
|
|||||||
if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") {
|
if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") {
|
||||||
$Reason += ", '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'"
|
$Reason += ", '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if ($Reason -ne "") {
|
if ($Reason -ne "") {
|
||||||
Write-Host "⚠️ Pending reboot (found $($Reason.substring(2)) in registry)"
|
Write-Host "⚠️ Pending reboot (registry contains $($Reason.substring(2)))"
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
if ($Reason -eq "") {
|
||||||
Write-Host "✅ No pending reboot"
|
Write-Host "✅ No pending reboot"
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
## The *check-ping.ps1* Script
|
## The *check-ping.ps1* Script
|
||||||
|
|
||||||
This PowerShell script checks the ping latency from the local computer to 9 popular hosts.
|
This PowerShell script measures the ping roundtrip times from the local computer to 10 Internet servers.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-ping.ps1 [[-hosts] <String>] [<CommonParameters>]
|
check-ping.ps1 [[-hosts] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-hosts <String>
|
-hosts <String>
|
||||||
Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com)
|
Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com)
|
||||||
|
|
||||||
Required? false
|
Required? false
|
||||||
Position? 1
|
Position? 1
|
||||||
Default value amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com
|
Default value amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com
|
||||||
Accept pipeline input? false
|
Accept pipeline input? false
|
||||||
Accept wildcard characters? false
|
Accept wildcard characters? false
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ This PowerShell script checks the ping latency from the local computer to 9 popu
|
|||||||
## Example
|
## Example
|
||||||
```powershell
|
```powershell
|
||||||
PS> ./check-ping
|
PS> ./check-ping
|
||||||
✅ Ping latency is 13ms...109ms with 25ms average.
|
✅ Ping latency is 29ms average (13ms...109ms, 0 loss)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -39,37 +39,42 @@ https://github.com/fleschutz/PowerShell
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Checks the ping latency
|
Checks the ping latency
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script checks the ping latency from the local computer to 9 popular hosts.
|
This PowerShell script measures the ping roundtrip times from the local computer to 10 Internet servers.
|
||||||
.PARAMETER hosts
|
.PARAMETER hosts
|
||||||
Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com)
|
Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-ping
|
PS> ./check-ping
|
||||||
✅ Ping latency is 13ms...109ms with 25ms average.
|
✅ Ping latency is 29ms average (13ms...109ms, 0 loss)
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz | License: CC0
|
Author: Markus Fleschutz | License: CC0
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$hosts = "amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com")
|
param([string]$hosts = "amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Write-Progress "⏳ Sending a ping to 9 popular hosts..."
|
Write-Host "✅ Ping latency is" -noNewline
|
||||||
$HostsArray = $hosts.Split(",")
|
$hostsArray = $hosts.Split(",")
|
||||||
$Pings = Test-Connection -computerName $HostsArray -count 1
|
$t = $hostsArray | foreach {
|
||||||
|
(New-Object Net.NetworkInformation.Ping).SendPingAsync($_, 250)
|
||||||
[int]$Min = 9999999
|
|
||||||
[int]$Max = [int]$Avg = 0
|
|
||||||
foreach($Ping in $Pings) {
|
|
||||||
if ($IsLinux) { [int]$Latency = $Ping.latency } else { [int]$Latency = $Ping.ResponseTime }
|
|
||||||
if ($Latency -lt $Min) { $Min = $Latency }
|
|
||||||
if ($Latency -gt $Max) { $Max = $Latency }
|
|
||||||
$Avg += $Latency
|
|
||||||
}
|
}
|
||||||
$Avg /= $Pings.count
|
[Threading.Tasks.Task]::WaitAll($t)
|
||||||
|
[int]$min = 9999999
|
||||||
Write-Progress -Completed "."
|
[int]$max = [int]$avg = [int]$successCount = [int]$lossCount = 0
|
||||||
Write-Host "✅ Ping latency is $($Min)ms...$($Max)ms with $($Avg)ms average"
|
foreach($ping in $t.Result) {
|
||||||
|
if ($ping.Status -eq "Success") {
|
||||||
|
[int]$latency = $ping.RoundtripTime
|
||||||
|
if ($latency -lt $min) { $min = $Latency }
|
||||||
|
if ($latency -gt $max) { $max = $Latency }
|
||||||
|
$avg += $latency
|
||||||
|
$successCount++
|
||||||
|
} else {
|
||||||
|
$lossCount++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$avg /= $successCount
|
||||||
|
Write-Host " $($avg)ms average ($($min)ms...$($max)ms, $lossCount loss)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the PowerShell status and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-powershell.ps1 [<CommonParameters>]
|
check-powershell.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
## The *check-ps1-file.ps1* Script
|
## The *check-ps1-file.ps1* Script
|
||||||
|
|
||||||
This PowerShell script checks the given PowerShell file(s) for validity.
|
This PowerShell script checks the given PowerShell script file(s) for validity.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-ps1-file.ps1 [[-filePattern] <String>] [<CommonParameters>]
|
check-ps1-file.ps1 [[-filePattern] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-filePattern <String>
|
-filePattern <String>
|
||||||
Specifies the file pattern to the PowerShell file(s)
|
Specifies the file pattern to the PowerShell file(s)
|
||||||
@ -39,7 +39,7 @@ https://github.com/fleschutz/PowerShell
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Checks PowerShell file(s) for validity
|
Checks PowerShell file(s) for validity
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script checks the given PowerShell file(s) for validity.
|
This PowerShell script checks the given PowerShell script file(s) for validity.
|
||||||
.PARAMETER filePattern
|
.PARAMETER filePattern
|
||||||
Specifies the file pattern to the PowerShell file(s)
|
Specifies the file pattern to the PowerShell file(s)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
@ -55,13 +55,13 @@ param([string]$filePattern = "")
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if ($filePattern -eq "" ) { $path = Read-Host "Enter the file pattern to the PowerShell file(s)" }
|
if ($filePattern -eq "" ) { $path = Read-Host "Enter the file pattern to the PowerShell file(s)" }
|
||||||
$files = Get-ChildItem $filePattern
|
|
||||||
|
$files = Get-ChildItem -path "$filePattern" -attributes !Directory
|
||||||
foreach ($file in $files) {
|
foreach ($file in $files) {
|
||||||
$syntaxError = @()
|
$syntaxError = @()
|
||||||
[void][System.Management.Automation.Language.Parser]::ParseFile($file, [ref]$null, [ref]$syntaxError)
|
[void][System.Management.Automation.Language.Parser]::ParseFile($file, [ref]$null, [ref]$syntaxError)
|
||||||
if ("$syntaxError" -ne "") { throw "$syntaxError" }
|
if ("$syntaxError" -ne "") { throw "$syntaxError" }
|
||||||
$basename = (Get-Item "$file").Basename
|
"✔️ Valid PowerShell in $($file.Name)"
|
||||||
"✔️ Valid PowerShell in $basename"
|
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -4,10 +4,10 @@ This PowerShell script verifies the integrity of a local Git repository.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
|
check-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-RepoDir <String>
|
-RepoDir <String>
|
||||||
Specifies the path to the Git repository (current working dir by default)
|
Specifies the path to the Git repository (current working directory by default)
|
||||||
|
|
||||||
Required? false
|
Required? false
|
||||||
Position? 1
|
Position? 1
|
||||||
@ -22,7 +22,15 @@ This PowerShell script verifies the integrity of a local Git repository.
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
```powershell
|
```powershell
|
||||||
PS> ./check-repo C:\MyRepo
|
PS> ./check-repo.ps1 C:\MyRepo
|
||||||
|
⏳ (1/10) Searching for Git executable... git version 2.41.0.windows.3
|
||||||
|
⏳ (2/10) Checking local folder... 📂C:\MyRepo
|
||||||
|
⏳ (3/10) Querying remote URL... git@github.com:fleschutz/PowerShell.git
|
||||||
|
⏳ (4/10) Querying current branch... main
|
||||||
|
⏳ (5/10) Fetching remote updates...
|
||||||
|
⏳ (6/10) Querying latest tag... v0.8 (commit 02171a401d83b01a0cda0af426840b605e617f08)
|
||||||
|
⏳ (7/10) Verifying data integrity...
|
||||||
|
...
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -40,9 +48,17 @@ https://github.com/fleschutz/PowerShell
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script verifies the integrity of a local Git repository.
|
This PowerShell script verifies the integrity of a local Git repository.
|
||||||
.PARAMETER RepoDir
|
.PARAMETER RepoDir
|
||||||
Specifies the path to the Git repository (current working dir by default)
|
Specifies the path to the Git repository (current working directory by default)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-repo C:\MyRepo
|
PS> ./check-repo.ps1 C:\MyRepo
|
||||||
|
⏳ (1/10) Searching for Git executable... git version 2.41.0.windows.3
|
||||||
|
⏳ (2/10) Checking local folder... 📂C:\MyRepo
|
||||||
|
⏳ (3/10) Querying remote URL... git@github.com:fleschutz/PowerShell.git
|
||||||
|
⏳ (4/10) Querying current branch... main
|
||||||
|
⏳ (5/10) Fetching remote updates...
|
||||||
|
⏳ (6/10) Querying latest tag... v0.8 (commit 02171a401d83b01a0cda0af426840b605e617f08)
|
||||||
|
⏳ (7/10) Verifying data integrity...
|
||||||
|
...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -58,7 +74,7 @@ try {
|
|||||||
& git --version
|
& git --version
|
||||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||||
|
|
||||||
Write-Host "⏳ (2/10) Checking repository... " -noNewline
|
Write-Host "⏳ (2/10) Checking local folder... " -noNewline
|
||||||
$FullPath = Resolve-Path "$RepoDir"
|
$FullPath = Resolve-Path "$RepoDir"
|
||||||
if (!(Test-Path "$FullPath" -pathType Container)) { throw "Can't access folder: $FullPath" }
|
if (!(Test-Path "$FullPath" -pathType Container)) { throw "Can't access folder: $FullPath" }
|
||||||
"📂$FullPath"
|
"📂$FullPath"
|
||||||
@ -71,9 +87,9 @@ try {
|
|||||||
& git -C "$FullPath" branch --show-current
|
& git -C "$FullPath" branch --show-current
|
||||||
if ($lastExitCode -ne "0") { throw "'git branch --show-current' failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git branch --show-current' failed with exit code $lastExitCode" }
|
||||||
|
|
||||||
Write-Host "⏳ (5/10) Fetching updates..."
|
Write-Host "⏳ (5/10) Fetching remote updates..."
|
||||||
& git -C "$FullPath" fetch
|
& git -C "$FullPath" fetch
|
||||||
if ($lastExitCode -ne "0") { throw "'git branch --show-current' failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" }
|
||||||
|
|
||||||
Write-Host "⏳ (6/10) Querying latest tag... " -noNewline
|
Write-Host "⏳ (6/10) Querying latest tag... " -noNewline
|
||||||
$LatestTagCommitID = (git -C "$FullPath" rev-list --tags --max-count=1)
|
$LatestTagCommitID = (git -C "$FullPath" rev-list --tags --max-count=1)
|
||||||
@ -98,7 +114,7 @@ try {
|
|||||||
|
|
||||||
$RepoDirName = (Get-Item "$FullPath").Name
|
$RepoDirName = (Get-Item "$FullPath").Name
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ successfully checked repo 📂$RepoDirName in $Elapsed sec"
|
"✔️ checked Git repository 📂$RepoDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the time until Saint Nicholas Day and replies by t
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-santa.ps1 [<CommonParameters>]
|
check-santa.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
64
Docs/check-software.md
Normal file
64
Docs/check-software.md
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
## The *check-software.ps1* Script
|
||||||
|
|
||||||
|
This PowerShell script queries the software details of the local computer and prints it.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
```powershell
|
||||||
|
check-software.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
|
[<CommonParameters>]
|
||||||
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```powershell
|
||||||
|
PS> ./check-software.ps1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
S O F T W A R E
|
||||||
|
✅ BIOS 'P62 v02.67', release HPQOEM - 0, S/N CZC448B9C1 by HP
|
||||||
|
...
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
|
||||||
|
## Related Links
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
```powershell
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Checks the software
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script queries the software details of the local computer and prints it.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./check-software.ps1
|
||||||
|
|
||||||
|
S O F T W A R E
|
||||||
|
✅ BIOS 'P62 v02.67', release HPQOEM - 0, S/N CZC448B9C1 by HP
|
||||||
|
...
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
" "
|
||||||
|
& "$PSScriptRoot/write-green.ps1" " S O F T W A R E"
|
||||||
|
& "$PSScriptRoot/check-bios.ps1"
|
||||||
|
& "$PSScriptRoot/check-os.ps1"
|
||||||
|
& "$PSScriptRoot/check-powershell.ps1"
|
||||||
|
& "$PSScriptRoot/check-apps.ps1"
|
||||||
|
& "$PSScriptRoot/check-uptime.ps1"
|
||||||
|
& "$PSScriptRoot/check-time-zone.ps1"
|
||||||
|
& "$PSScriptRoot/check-swap-space.ps1"
|
||||||
|
& "$PSScriptRoot/check-pending-reboot.ps1"
|
||||||
|
exit 0 # success
|
||||||
|
```
|
||||||
|
|
||||||
|
*Generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1*
|
@ -4,7 +4,7 @@ This PowerShell script checks the given subnet mask for validity.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-subnet-mask.ps1 [[-address] <String>] [<CommonParameters>]
|
check-subnet-mask.ps1 [[-address] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-address <String>
|
-address <String>
|
||||||
Specifies the subnet mask to check
|
Specifies the subnet mask to check
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the status of the swap space and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-swap-space.ps1 [[-MinLevel] <Int32>] [<CommonParameters>]
|
check-swap-space.ps1 [[-MinLevel] <Int32>] [<CommonParameters>]
|
||||||
|
|
||||||
-MinLevel <Int32>
|
-MinLevel <Int32>
|
||||||
Specifies the minimum level (10 GB by default)
|
Specifies the minimum level (10 GB by default)
|
||||||
|
@ -5,7 +5,7 @@ It returns the number of broken symlinks as exit value.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-symlinks.ps1 [[-Folder] <String>] [<CommonParameters>]
|
check-symlinks.ps1 [[-Folder] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-Folder <String>
|
-Folder <String>
|
||||||
Specifies the path to the folder
|
Specifies the path to the folder
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the time zone and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-time-zone.ps1 [<CommonParameters>]
|
check-time-zone.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
@ -14,7 +14,7 @@ This PowerShell script queries the time zone and prints it.
|
|||||||
## Example
|
## Example
|
||||||
```powershell
|
```powershell
|
||||||
PS> ./check-time-zone
|
PS> ./check-time-zone
|
||||||
✅ 11:13 AM (UTC + 01:00:00 W. Europe Standard Time + 01:00:00 daylight saving time)
|
✅ 11:13 AM W. Europe Summer Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (+01:00 DST)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ https://github.com/fleschutz/PowerShell
|
|||||||
This PowerShell script queries the time zone and prints it.
|
This PowerShell script queries the time zone and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-time-zone
|
PS> ./check-time-zone
|
||||||
✅ 11:13 AM (UTC + 01:00:00 W. Europe Standard Time + 01:00:00 daylight saving time)
|
✅ 11:13 AM W. Europe Summer Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (+01:00 DST)
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -44,8 +44,14 @@ try {
|
|||||||
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
|
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
|
||||||
$Time = $((Get-Date).ToShortTimeString())
|
$Time = $((Get-Date).ToShortTimeString())
|
||||||
$TZ = (Get-Timezone)
|
$TZ = (Get-Timezone)
|
||||||
if ($TZ.SupportsDaylightSavingTime) { $DST="+ 01:00:00 daylight saving time" } else { $DST="" }
|
if ($TZ.SupportsDaylightSavingTime) {
|
||||||
Write-Host "✅ $Time (UTC + $($TZ.BaseUtcOffset) $($TZ.Id) $DST)"
|
$TZName = $TZ.DaylightName
|
||||||
|
$DST=" (+01:00 DST)"
|
||||||
|
} else {
|
||||||
|
$TZName = $TZ.StandardName
|
||||||
|
$DST=""
|
||||||
|
}
|
||||||
|
Write-Host "✅ $Time $TZName $($TZ.DisplayName)$($DST)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script queries the computer's uptime and prints it.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-uptime.ps1 [<CommonParameters>]
|
check-uptime.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
## The *check-vpn.ps1* Script
|
## The *check-vpn.ps1* Script
|
||||||
|
|
||||||
This PowerShell script queries the status of the VPN connections and prints it.
|
This PowerShell script queries and prints the status of the VPN connection(s).
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-vpn.ps1 [<CommonParameters>]
|
check-vpn.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
@ -13,8 +13,8 @@ This PowerShell script queries the status of the VPN connections and prints it.
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
```powershell
|
```powershell
|
||||||
PS> ./check-vpn
|
PS> ./check-vpn.ps1
|
||||||
✅ Disconnected VPN 'NASA L2TP'
|
✅ VPN to NASA L2TP is disconnected
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -30,10 +30,10 @@ https://github.com/fleschutz/PowerShell
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Checks the VPN status
|
Checks the VPN status
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script queries the status of the VPN connections and prints it.
|
This PowerShell script queries and prints the status of the VPN connection(s).
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-vpn
|
PS> ./check-vpn.ps1
|
||||||
✅ Disconnected VPN 'NASA L2TP'
|
✅ VPN to NASA L2TP is disconnected
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -47,11 +47,11 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
$Connections = Get-VPNConnection
|
$Connections = Get-VPNConnection
|
||||||
foreach($Connection in $Connections) {
|
foreach($Connection in $Connections) {
|
||||||
"✅ $($Connection.ConnectionStatus) VPN '$($Connection.Name)'"
|
Write-Host "✅ VPN to $($Connection.Name) is $($Connection.ConnectionStatus.ToLower())"
|
||||||
$NoVPN = $false
|
$NoVPN = $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($NoVPN) { "⚠️ No VPN" }
|
if ($NoVPN) { Write-Host "⚠️ No VPN configured" }
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the current weather report.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-weather.ps1 [[-location] <String>] [<CommonParameters>]
|
check-weather.ps1 [[-location] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-location <String>
|
-location <String>
|
||||||
Specifies the location to use (determined automatically per default)
|
Specifies the location to use (determined automatically per default)
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script determines and speaks the current week number by text-to-
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-week.ps1 [<CommonParameters>]
|
check-week.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script determines the current wind conditions and replies by tex
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-wind.ps1 [[-location] <String>] [<CommonParameters>]
|
check-wind.ps1 [[-location] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-location <String>
|
-location <String>
|
||||||
Specifies the location to use (determined automatically per default)
|
Specifies the location to use (determined automatically per default)
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the validity of the Windows system files. It requi
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-windows-system-files.ps1 [<CommonParameters>]
|
check-windows-system-files.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script checks the given XML file for validity.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/check-xml-file.ps1 [[-file] <String>] [<CommonParameters>]
|
check-xml-file.ps1 [[-file] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-file <String>
|
-file <String>
|
||||||
Specifies the path to the XML file to check
|
Specifies the path to the XML file to check
|
||||||
|
@ -5,7 +5,7 @@ NOTE: To be used with care! This cannot be undone!
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/clean-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
|
clean-repo.ps1 [[-RepoDir] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-RepoDir <String>
|
-RepoDir <String>
|
||||||
Specifies the file path to the local Git repository
|
Specifies the file path to the local Git repository
|
||||||
@ -60,11 +60,11 @@ try {
|
|||||||
& git --version
|
& git --version
|
||||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||||
|
|
||||||
"⏳ (2/4) Checking repository... 📂$RepoDir"
|
"⏳ (2/4) Checking local repository... 📂$RepoDir"
|
||||||
if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder '$RepoDir' - maybe a typo or missing folder permissions?" }
|
if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder '$RepoDir' - maybe a typo or missing folder permissions?" }
|
||||||
$RepoDirName = (Get-Item "$RepoDir").Name
|
$RepoDirName = (Get-Item "$RepoDir").Name
|
||||||
|
|
||||||
"⏳ (3/4) Removing repo's untracked files..."
|
"⏳ (3/4) Removing untracked files in repository..."
|
||||||
& git -C "$RepoDir" clean -xfd -f # to delete all untracked files in the main repo
|
& git -C "$RepoDir" clean -xfd -f # to delete all untracked files in the main repo
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
Write-Warning "'git clean' failed with exit code $lastExitCode, retrying once..."
|
Write-Warning "'git clean' failed with exit code $lastExitCode, retrying once..."
|
||||||
@ -72,7 +72,7 @@ try {
|
|||||||
if ($lastExitCode -ne "0") { throw "'git clean' failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git clean' failed with exit code $lastExitCode" }
|
||||||
}
|
}
|
||||||
|
|
||||||
"⏳ (4/4) Removing submodules' untracked files..."
|
"⏳ (4/4) Removing untracked files in submodules..."
|
||||||
& git -C "$RepoDir" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules
|
& git -C "$RepoDir" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules
|
||||||
if ($lastExitCode -ne "0") { throw "'git clean' in the submodules failed with exit code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'git clean' in the submodules failed with exit code $lastExitCode" }
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script cleans all Git repositories in a folder from untracked fi
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/clean-repos.ps1 [[-ParentDir] <String>] [<CommonParameters>]
|
clean-repos.ps1 [[-ParentDir] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-ParentDir <String>
|
-ParentDir <String>
|
||||||
Specifies the path to the parent folder
|
Specifies the path to the parent folder
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script clears the DNS client cache of the local computer.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/clear-dns-cache.ps1 [<CommonParameters>]
|
clear-dns-cache.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -5,7 +5,7 @@ IMPORTANT NOTE: this cannot be undo!
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/clear-recycle-bin.ps1 [<CommonParameters>]
|
clear-recycle-bin.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script clones popular Git repositories into a target directory.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/clone-repos.ps1 [[-TargetDir] <String>] [<CommonParameters>]
|
clone-repos.ps1 [[-TargetDir] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-TargetDir <String>
|
-TargetDir <String>
|
||||||
Specifies the file path to the target directory (current working directory by default)
|
Specifies the file path to the target directory (current working directory by default)
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the calculator application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-calculator.ps1 [<CommonParameters>]
|
close-calculator.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Google Chrome Web browser gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-chrome.ps1 [<CommonParameters>]
|
close-chrome.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes Microsoft's Cortana application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-cortana.ps1 [<CommonParameters>]
|
close-cortana.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Edge Web browser gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-edge.ps1 [<CommonParameters>]
|
close-edge.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft File Explorer application gracefully
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-file-explorer.ps1 [<CommonParameters>]
|
close-file-explorer.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Mozilla Firefox Web browser gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-firefox.ps1 [<CommonParameters>]
|
close-firefox.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Git Extensions application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-git-extensions.ps1 [<CommonParameters>]
|
close-git-extensions.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Windows Screen Magnifier application gracefull
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-magnifier.ps1 [<CommonParameters>]
|
close-magnifier.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Paint application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-microsoft-paint.ps1 [<CommonParameters>]
|
close-microsoft-paint.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Store application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-microsoft-store.ps1 [<CommonParameters>]
|
close-microsoft-store.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Netflix application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-netflix.ps1 [<CommonParameters>]
|
close-netflix.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Notepad application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-note-pad.ps1 [<CommonParameters>]
|
close-note-pad.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the OBS Studio application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-obs-studio.ps1 [<CommonParameters>]
|
close-obs-studio.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the OneCalendar application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-one-calendar.ps1 [<CommonParameters>]
|
close-one-calendar.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Outlook email application gracefully
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-outlook.ps1 [<CommonParameters>]
|
close-outlook.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Paint 3D application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-paint-three-d.ps1 [<CommonParameters>]
|
close-paint-three-d.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes a program's processes gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-program.ps1 [[-FullProgramName] <String>] [[-ProgramName] <String>] [[-ProgramAliasName] <String>] [<CommonParameters>]
|
close-program.ps1 [[-FullProgramName] <String>] [[-ProgramName] <String>] [[-ProgramAliasName] <String>] [<CommonParameters>]
|
||||||
|
|
||||||
-FullProgramName <String>
|
-FullProgramName <String>
|
||||||
Specifies the full program name
|
Specifies the full program name
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Serenade.ai application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-serenade.ps1 [<CommonParameters>]
|
close-serenade.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
@ -4,7 +4,7 @@ This PowerShell script closes the Snipping Tool application gracefully.
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
```powershell
|
```powershell
|
||||||
/home/mf/Repos/PowerShell/Scripts/close-snipping-tool.ps1 [<CommonParameters>]
|
close-snipping-tool.ps1 [<CommonParameters>]
|
||||||
|
|
||||||
[<CommonParameters>]
|
[<CommonParameters>]
|
||||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user