mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-25 17:33:17 +01:00
Renamed to list-profiles.ps1
This commit is contained in:
parent
f0e080c867
commit
daf53ac0c4
@ -53,7 +53,7 @@ list-news.ps1, lists the latest news
|
||||
list-os-releases.ps1, lists OS releases and download URL
|
||||
list-printers.ps1, lists all printer known to the computer
|
||||
list-processes.ps1, lists the local computer processes
|
||||
list-profile.ps1, lists your PowerShell profile file
|
||||
list-profiles.ps1, lists your PowerShell profiles
|
||||
list-random-passwords.ps1, prints a list of random passwords
|
||||
list-random-pins.ps1, prints a list of random PIN's
|
||||
list-scripts.ps1, lists all PowerShell scripts in this repository
|
||||
|
|
@ -103,7 +103,7 @@ Scripts for PowerShell 🔎
|
||||
* [list-automatic-variables.ps1](Scripts/list-automatic-variables.ps1) - lists the automatic variables of PowerShell
|
||||
* [list-cmdlets.ps1](Scripts/list-cmdlets.ps1) - lists the PowerShell cmdlets
|
||||
* [list-modules.ps1](Scripts/list-modules.ps1) - lists the PowerShell modules
|
||||
* [list-profile.ps1](Scripts/list-profile.ps1) - lists your PowerShell profile file
|
||||
* [list-profiles.ps1](Scripts/list-profiles.ps1) - lists your PowerShell profiles
|
||||
* [list-scripts.ps1](Scripts/list-scripts.ps1) - lists all PowerShell scripts in this repository
|
||||
|
||||
Various Scripts 🛒
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./list-profile.ps1
|
||||
.DESCRIPTION lists your PowerShell profile file
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
$PathToProfile = "$PROFILE"
|
||||
|
||||
if (test-path $PathToProfile) {
|
||||
$Content = get-content $PathToProfile
|
||||
write-output "Profile file at: $PathToProfile"
|
||||
write-output "$Content"
|
||||
} else {
|
||||
write-warning "No profile file at: $PathToProfile"
|
||||
}
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
16
Scripts/list-profiles.ps1
Executable file
16
Scripts/list-profiles.ps1
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./list-profiles.ps1
|
||||
.DESCRIPTION lists your PowerShell profiles
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
$PROFILE | select-object *
|
||||
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user