Skip to content

Commit

Permalink
Updating scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Mo Figueroa <[email protected]>
  • Loading branch information
mdf-ido committed Sep 8, 2024
1 parent 2d458b3 commit 47ed72a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 119 deletions.
2 changes: 0 additions & 2 deletions DockerIMGBad/Dockerfile

This file was deleted.

36 changes: 0 additions & 36 deletions DockerIMGElasticsearch/dockerfile

This file was deleted.

17 changes: 8 additions & 9 deletions powershell/NMAUserG.ps1 → powershell/AddUserstoAnyGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- The following function will take a csv formatted with columns named: Project Assignment,Status,Staff person,Work Email Address
- The function will use the Work Email Address column to go through each entry
- If a blank entry is found it will be skipped.
- If the column contains an email NOT like @nanmckay.com it will be skipped.
- If the column contains an email NOT like @domain.com it will be skipped.
.Prerequisites
You must run this script on a PowerShell Version 5.1 or higher and have the latest MSOLService module installed.
--> Install-Module -Name MSOnline -Force
Expand All @@ -13,12 +13,11 @@
1. Load the function into powershell with: . .\Add-NMAUsrToGroup.ps1
2. Add users' email in the full_list_upn.csv into a security group named Something use the following syntax:
--> Add-NMAUserToGroup -SourceCSVPath full_list_upn.csv -GroupName Something
.NOTES
Filename: Add-NMAUsrToGroup.ps1
Author: GemTeam
Version 1
#>
function Add-NMAUserToGroup {
3. Add users' email in the full_list_upn.csv into a security group named Something use the following syntax:
--> Add-NMAUserToGroup -SourceCSVPath full_list_upn.csv -GroupName Something -GroupType AD
function Add-UserToGroup {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)][String]$SourceCSVPath,
Expand All @@ -38,14 +37,14 @@ function Add-NMAUserToGroup {
Write-Host "Skipping blank"
continue
}
if ($name."Work Email Address" -like "*@nanmckay.com") {
if ($name."Work Email Address" -like "*@domain.com") {
$gmsg = "Adding " + $name."Work Email Address" + " to " + $GroupName
Write-Host $gmsg -BackgroundColor Black -ForegroundColor Green
Add-ADGroupMember -Identity $GroupName -members $name."Work Email Address"
}
else {
$name."Work Email Address"
Write-Host "Cannot process entry since it is not a blank or email doesn't end with @nanmckay.com"
Write-Host "Cannot process entry since it is not a blank or email doesn't end with @domain.com"
}
}
Expand Down
1 change: 0 additions & 1 deletion powershell/ChangePassword.ps1

This file was deleted.

47 changes: 0 additions & 47 deletions python/cmcbotelastic.py

This file was deleted.

24 changes: 0 additions & 24 deletions python/youbad.py

This file was deleted.

0 comments on commit 47ed72a

Please sign in to comment.