This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#---------------------------------------------------------------------------------------------------------------------------- | |
August 2017 - Robin Beismann - Michael Wessel Informationstechnologie GmbH | |
This script creates dummy users for MAC based Microsoft NPS Radius authentication by using MAC Addresses out of a specific | |
AD User Attribut containing MAC Addresses seperated by semicolas | |
CAUTION: THIS WILL DELETE ALL USERS OUT OF A SPECIFIC ORGANIZATIONAL UNIT IF THEY MATCH THE SCHEMA! | |
----------------------------------------------------------------------------------------------------------------------------#> | |
#Define base OU for the dummy users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#---------------------------------------------------------------------------------------------------------------------------- | |
August 2017 - Robin Beismann - Michael Wessel Informationstechnologie GmbH | |
This script copys the CRLs from the different sites onto the DMZ Webserver(s) | |
config.xml may look like: | |
<Config> | |
<source share="<to be filled>" username="<to be filled>" password="<to be filled>"/> | |
<destination share="<to be filled>" username="<to be filled>" password="<to be filled>"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[regex]$regex = "(?:,)(?'name'((CN|OU=).*))" | |
Get-ADUser -Filter * -SearchBase "OU=Benutzer,DC=ad2016,DC=faq-o-matic,DC=net" | ForEach-Object { | |
$ou = $regex.Match($_.DistinguishedName).Groups['name'] | |
Write-Host($_.Name + ": $ou") | |
$_ | Set-ADUser -Add @{info=$ou} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Variable Definition | |
$dryRun = $true | |
$searchBase = (Get-ADDomain).DistinguishedName | |
#endregion | |
#region Code below | |
#Gather the DomainSID | |
$domainSID = (Get-ADDomain).DomainSid.Value | |
#Fix on one DC so we don't run into replication problems after adding a user to a group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://github.com/BeyondTrust/pbis-open/releases/download/8.5.7/pbis-open-8.5.7.385.linux.x86_64.deb.sh; | |
chmod +x pbis-open-*.sh; | |
./pbis-open-*.sh; | |
/opt/pbis/bin/domainjoin-cli join contoso.com binduser "bindpw"; | |
pam-auth-update --force; | |
/opt/pbis/bin/config UserDomainPrefix CONTOSO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to https://github.com/RobinBeismann/PowerShell-Scripts/blob/master/PKI/Enroll-DMZ-OCSP-Responder-Certificate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$installFolder = "$env:ProgramFiles\BomgarJumpClient" | |
if( | |
(Test-Path -Path $installFolder) -and | |
(Test-Path -Path "$installFolder\bomgar-scc.exe") -and | |
(Test-Path -Path "$installFolder\server.lic") | |
){ | |
Get-ChildItem -Path $installFolder | Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) } | ForEach-Object { | |
"Installed" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Load Modules | |
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn; | |
Import-Module ActiveDirectory | |
try{ | |
Write-Host("Retrieving AD Users") | |
$ADUsers = Get-ADUser -Filter * -Properties objectSID, msExchMasterAccountSid, sidHistory, msExchDelegateListLink -ErrorAction Stop | |
Write-Host("Retrieving Mailbox Permissions") | |
$MailboxPerm = Get-MailboxPermission -ResultSize Unlimited -Identity * -ErrorAction Stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$installParams = @( | |
"--jc-name `"$($env:computername)`"", | |
"--install-dir `"$AgentInstallPath`"", | |
"--jc-jump-group `"jumpgroup:$BomgarJumpGroup`"", | |
"--jc-session-policy-present `"$BomgarSessionPolicy_Customer_present`"", | |
"--jc-session-policy-not-present `"$BomgarSessionPolicy_Customer_not_present`"", | |
"--silent" | |
) | |
Write-Log -Message "Installing Bomgar to $AgentInstallPath" | |
Write-Log -Message "Executing: $binary $($installParams -join " ")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($membersToAdd.Count -gt 0){ | |
Write-Host("Writing membersToAdd") | |
$chunkArr = $membersToAdd | |
$chunks = [System.Collections.ArrayList]::new() | |
for ($i = 0; $i -lt $chunkArr.Count; $i += 20) { | |
if(($chunkArr.Count - $i) -gt 19) { | |
$null = $chunks.add($chunkArr[$i..($i + 19)]) | |
}else{ | |
$null = $chunks.add($chunkArr[$i..($chunkArr.Count - 1)]) |
OlderNewer