mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-22 01:48:20 +02:00
Update check-powershell.ps1 and list-aliases.ps1
This commit is contained in:
parent
0654d7730b
commit
aa593c5edc
@ -14,7 +14,9 @@
|
|||||||
try {
|
try {
|
||||||
$Version = $PSVersionTable.PSVersion
|
$Version = $PSVersionTable.PSVersion
|
||||||
$Edition = $PSVersionTable.PSEdition
|
$Edition = $PSVersionTable.PSEdition
|
||||||
"✅ PowerShell $Version ($Edition edition)"
|
$Modules = Get-Module
|
||||||
|
$Aliases = Get-Alias
|
||||||
|
"✅ PowerShell $Version ($Edition edition) with $($Modules.Count) modules and $($Aliases.Count) aliases"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
get-alias
|
Get-Alias
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user