Run through PowerShell formatter

This commit is contained in:
Anthony Rose 2023-06-26 15:16:30 +01:00
parent 90a163007a
commit 3b3918dc22

View file

@ -25,8 +25,9 @@ function Prompt {
}
function ADUserInfo {
Param (
[Parameter(Mandatory=$true)] [string]$User
param (
[Parameter(Mandatory)]
[string]$User
)
Import-Module ActiveDirectory -ErrorAction Stop
$ADPropertiesCommon = @(
@ -62,8 +63,9 @@ function ADUserInfo {
}
Function mkcd {
Param (
[Parameter(Mandatory=$true,Position=0)] [string]$Path
param (
[Parameter(Mandatory)]
[string]$Path
)
New-Item -ItemType Directory -Path $Path
Set-Location -Path $Path
@ -87,7 +89,7 @@ Set-PSReadLineKeyHandler -Chord Ctrl+RightArrow -Function ForwardWord
Set-PSReadLineKeyHandler -Chord Ctrl+Backspace -Function BackwardKillWord
Set-PSReadLineKeyHandler -Chord Ctrl+Delete -Function KillWord
if ($PSVersionTable.PSVersion -ge [System.Version]"7.2") {
if ($PSVersionTable.PSVersion -ge [System.Version]"7.2.0.0") {
$AnsiReset = "`e[0m"
Set-PSReadLineOption -Colors @{
Default = $AnsiReset;