mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-29 21:24:45 +02:00
Improved the output
This commit is contained in:
parent
ee7fd35b75
commit
1841a8a931
@ -7,13 +7,12 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
function ShowProfile { param([int]$Level, [string]$Name, [string]$Filename)
|
function ShowProfile { param([int]$Level, [string]$Name, [string]$Filename)
|
||||||
write-output "$($Level). '$($Name)'"
|
write-output "Level: $Level"
|
||||||
|
write-output "Name: $Name"
|
||||||
if (test-path "$Filename") {
|
if (test-path "$Filename") {
|
||||||
write-output " at $($Filename) containing:"
|
write-output "File: $Filename"
|
||||||
$Content = get-content $Filename
|
|
||||||
write-output "$Content"
|
|
||||||
} else {
|
} else {
|
||||||
write-output " at $Filename (file non-existent)"
|
write-output "File: $Filename (file missing)"
|
||||||
}
|
}
|
||||||
write-output ""
|
write-output ""
|
||||||
}
|
}
|
||||||
@ -21,7 +20,7 @@ function ShowProfile { param([int]$Level, [string]$Name, [string]$Filename)
|
|||||||
try {
|
try {
|
||||||
write-output ""
|
write-output ""
|
||||||
write-output "PowerShell Profiles"
|
write-output "PowerShell Profiles"
|
||||||
write-output "-------------------"
|
write-output "==================="
|
||||||
ShowProfile 1 "AllUsersAllHosts" $PROFILE.AllUsersAllHosts
|
ShowProfile 1 "AllUsersAllHosts" $PROFILE.AllUsersAllHosts
|
||||||
ShowProfile 2 "AllUsersCurrentHost" $PROFILE.AllUsersCurrentHost
|
ShowProfile 2 "AllUsersCurrentHost" $PROFILE.AllUsersCurrentHost
|
||||||
ShowProfile 3 "CurrentUserAllHosts" $PROFILE.CurrentUserAllHosts
|
ShowProfile 3 "CurrentUserAllHosts" $PROFILE.CurrentUserAllHosts
|
||||||
|
Loading…
Reference in New Issue
Block a user