Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions _posts/UserAdminModule/DisableADAccountsMenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,26 @@ function DisableADAccountsMenu {
Import-Module PSMenu

# Define the actions
function Disable-KurtisMarsden {
Disable-ADAccount -Identity kurtismarsden.admin
Write-Output "Account kurtismarsden.admin has been disabled."
function Disable-JohnSmith {
Disable-ADAccount -Identity JohnSmith.admin
Write-Output "Account JohnSmith.admin has been disabled."
Comment on lines +94 to +96
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name 'Disable-JohnSmith' doesn't follow PowerShell naming conventions. Consider using 'Disable-JohnSmithAccount' to be more descriptive and consistent with the action being performed.

Copilot generated this review using guidance from repository custom instructions.
}

function Disable-JamieBeale {
Disable-ADAccount -Identity jamiebeale.admin
Write-Output "Account jamiebeale.admin has been disabled."
function Disable-JackDaniels {
Disable-ADAccount -Identity JackDaniels.admin
Write-Output "Account JackDaniels.admin has been disabled."
Comment on lines +99 to +101
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name 'Disable-JackDaniels' doesn't follow PowerShell naming conventions. Consider using 'Disable-JackDanielsAccount' to be more descriptive and consistent with the action being performed.

Copilot generated this review using guidance from repository custom instructions.
}

function Disable-LukeLeigh {
Disable-ADAccount -Identity lukeleigh.admin
Write-Output "Account lukeleigh.admin has been disabled."
function Disable-GeoffGeoffries {
Disable-ADAccount -Identity GeoffGeoffries.admin
Write-Output "Account GeoffGeoffries.admin has been disabled."
Comment on lines +104 to +106
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name 'Disable-GeoffGeoffries' doesn't follow PowerShell naming conventions. Consider using 'Disable-GeoffGeoffriesAccount' to be more descriptive and consistent with the action being performed.

Copilot generated this review using guidance from repository custom instructions.
}

# Create the menu items
$menuItems = @(
"Disable Kurtis Marsden Account",
"Disable Jamie Beale Account",
"Disable Luke Leigh Account",
"Disable John Smith Account",
"Disable Jack Daniels Account",
"Disable Geoff Geoffries Account",
$(Get-MenuSeparator),
"Exit"
)
Expand All @@ -120,9 +120,9 @@ function DisableADAccountsMenu {

# Use the correct comparison operator and check the value of $Menu
switch ($Menu) {
0 { Disable-KurtisMarsden }
1 { Disable-JamieBeale }
2 { Disable-LukeLeigh }
0 { Disable-JohnSmith }
1 { Disable-JackDaniels }
2 { Disable-GeoffGeoffries }
default { Write-Output "Nothing Selected" }
}
}
Expand Down
Loading