This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Indents/PadLeft an InputString a specified amount (using specified char) and PadRight (with a specified char) if necessary to make output string the specified total length. | |
.DESCRIPTION | |
-- All PadLeft/PadRight constraints are adhered to. | |
-- By default if "IndentCount + InputString.Length() > TotalLength", Indent/PadLeft will take precedence [return string will be longer than TotalLength]. | |
This behavior can be overridden using "UseTotalLength". | |
-- Default padding character is a <space> which can be overridden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--== | |
function Pad-String ($InputString, $LeftPadding = 0, $RightPadding = 0) { | |
#--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--== | |
<# | |
.SYNOPSIS | |
LeftPads input string by the specified amount and RightPads if necessary to make output string the specified total length. | |
.DESCRIPTION | |
All LeftPad/RightPad constraints are adhered to. | |
#> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Get information about the services on the local Microsoft Windows machine with focus on the "Log on as" account details. | |
.PARAMETER Filtered | |
Services are filtered to those not using "built-in" accounts. | |
Basically ignore services where "Log on as" is "LocalSystem", "NTAuthority\NetorkService" and similar. | |
.PARAMETER Export | |
Service information is exported to CSV. |