Skip to content

Instantly share code, notes, and snippets.

View web.config
<?xml version="1.0" encoding="utf-8"?>
<section name="swaggerwcf" type="SwaggerWcf.Configuration.SwaggerWcfSection, SwaggerWcf" />
<section name="lithnetResourceManagementClient" type="Lithnet.ResourceManagement.Client.ClientConfigurationSection, Lithnet.ResourceManagement.Client" />
<add key="pageCacheIntervalSeconds" value="60" />
View chunks.ps1
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)])
$null = $chunks.add($chunkArr[$i..($chunkArr.Count - 1)])
View Bomgar PSADT.ps1
$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`"",
Write-Log -Message "Installing Bomgar to $AgentInstallPath"
Write-Log -Message "Executing: $binary $($installParams -join " ")"
View Set-DelegateList.ps1
#Load Modules
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;
Import-Module ActiveDirectory
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
View Bomgar Script Detection Method.ps1
$installFolder = "$env:ProgramFiles\BomgarJumpClient"
(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 {
View Renew-OCSPResponderCertificate.ps1
Moved to
RobinBeismann /
Created Jan 2, 2018
PBIS Open Domain Joining
chmod +x pbis-open-*.sh;
/opt/pbis/bin/domainjoin-cli join binduser "bindpw";
pam-auth-update --force;
/opt/pbis/bin/config UserDomainPrefix CONTOSO;
View Correct-ADPrimaryGroup.ps1
#region Variable Definition
$dryRun = $true
$searchBase = (Get-ADDomain).DistinguishedName
#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
View Fill-OldOUAttribute.ps1
[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}
View Copy-CRLs.ps1
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:
<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>"/>