Renamed to list-profiles.ps1

This commit is contained in:
Markus Fleschutz 2021-02-24 19:03:31 +01:00
parent f0e080c867
commit daf53ac0c4
4 changed files with 18 additions and 25 deletions

View File

@ -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

1 Script Description
53 list-os-releases.ps1 lists OS releases and download URL
54 list-printers.ps1 lists all printer known to the computer
55 list-processes.ps1 lists the local computer processes
56 list-profile.ps1 list-profiles.ps1 lists your PowerShell profile file lists your PowerShell profiles
57 list-random-passwords.ps1 prints a list of random passwords
58 list-random-pins.ps1 prints a list of random PIN's
59 list-scripts.ps1 lists all PowerShell scripts in this repository

View File

@ -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 🛒

View File

@ -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
View 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
}