-
Notifications
You must be signed in to change notification settings - Fork 3
Add functions to disable additional AD accounts #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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." | ||
| } | ||
|
|
||
| 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
|
||
| } | ||
|
|
||
| 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
|
||
| } | ||
|
|
||
| # 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" | ||
| ) | ||
|
|
@@ -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" } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
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.