Skip to content

Commit

Permalink
ADSEcurity: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
przybylskirobert committed Jan 22, 2024
1 parent 9b0c81e commit 989cf9d
Show file tree
Hide file tree
Showing 28 changed files with 50 additions and 682 deletions.
8 changes: 4 additions & 4 deletions Other/Other_steps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ redircmp $cmpDN
#region Sites
Import-Module ActiveDirectory
Get-ADObject -SearchBase (Get-ADRootDSE).ConfigurationNamingContext `
-filter "objectclass -eq 'site'" | `
where-object { $_.Name -eq 'Default-First-Site-Name' } | `
Rename-ADObject -NewName "HQ"
-filter "objectclass -eq 'site'" | `
where-object { $_.Name -eq 'Default-First-Site-Name' } | `
Rename-ADObject -NewName "HQ"
$subnet = Read-Host "Please provide subnet details"
New-ADReplicationSubnet -Name $subnet -Site "HQ"
#endrgion
Expand All @@ -37,7 +37,7 @@ $TemplatePSO.LockoutThreshold = 4
$name = "AdminsPSO"
New-ADFineGrainedPasswordPolicy -Instance $TemplatePSO -Name $name -Precedence 50 -Description "The Tiered users Password Policy" -DisplayName "Tiered Users PSO" -MaxPasswordAge "180.00:00:00" -MinPasswordLength 10
Add-ADFineGrainedPasswordPolicySubject -Identity $name -Subjects `
"Domain Admins", Tier1ServerMaintenance, tier1admins, Tier1PAWUsers, Tier2ServiceDeskOperators, tier2admins, Tier2WorkstationMaintenance
"Domain Admins", Tier1ServerMaintenance, tier1admins, Tier1PAWUsers, Tier2ServiceDeskOperators, tier2admins, Tier2WorkstationMaintenance
#endregion

#AD Resycle
Expand Down
21 changes: 0 additions & 21 deletions PAW/AdminGroups.csv

This file was deleted.

40 changes: 0 additions & 40 deletions PAW/Create-Group.ps1

This file was deleted.

40 changes: 0 additions & 40 deletions PAW/Create-User.ps1

This file was deleted.

34 changes: 0 additions & 34 deletions PAW/Import-GPO.ps1

This file was deleted.

31 changes: 0 additions & 31 deletions PAW/Link-GpoToOU.ps1

This file was deleted.

11 changes: 1 addition & 10 deletions PAW/PAW_steps.ps1
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
Throw "this is not a robust file"
$location = Get-Location
$dsnAME = (Get-ADDomain).DistinguishedName
$dNC = (Get-ADRootDSE).defaultNamingContext
$domain = $env:USERDNSDOMAIN
$ScriptsLocation = "C:\Tools\ADSecurity\PAW"
Set-Location $ScriptsLocation

Import-Module ActiveDirectory

#Region create Groups
$csv = Read-Host -Prompt "Please provide full path to Admin Groups csv file (without quotation marks)"
.$ScriptsLocation\Scripts\Create-Group.ps1 -CSVfile $csv -Verbose
$csv = Read-Host -Prompt "Please provide full path to Standard Groups csv file (without quotation marks)"
.$ScriptsLocation\Scripts\Create-Group.ps1 -CSVfile $csv -Verbose
#endRegion

#Region create Users
$csv = Read-Host -Prompt "Please provide full path to Users csv file (without quotation marks)"
Expand Down Expand Up @@ -52,7 +43,7 @@ Import-Module ActiveDirectory
$(New-Object PSObject -Property @{ Name = "Tier1 PAW Configuration - User PAC" ; OU = "OU=Accounts,OU=Tier1,OU=Admin"; Order = 1 ; LinkEnabled = 'YES' })
)
.$ScriptsLocation\Scripts\Link-GpoToOU.ps1 -GpoLinks $GpoLinks -Verbose
Set-Location $location
Set-Location $location

dsa.msc
gpmc.msc
Expand Down
40 changes: 0 additions & 40 deletions PAW/Scripts/Create-Group.ps1

This file was deleted.

5 changes: 0 additions & 5 deletions PAW/StandardGroups.csv

This file was deleted.

113 changes: 0 additions & 113 deletions PAW/gpo_backup.migtable

This file was deleted.

Loading

0 comments on commit 989cf9d

Please sign in to comment.