Audit uptime of all servers

Monitoring servers is an important thing, almost uptime of all servers.  You should have some dedicated tools such as Zabbix, Nagios, etc… BUT ! Here is a script to generate an HTML report of all your servers uptime.

Those servers are all registered into AD and the ‘get’ is based on the operating system detected by AD.

Read more

Massive AD Group Creation using Powershell

#Parameters 
$InputFile="import.csv"


#Variables
$errors=0
$success=0

#csv file that contains all groups to create 
$InputGroups=Import-csv $InputFile -Delimiter ";"

$InputGroups|
Foreach-Object{
	
	#Importing data
	$GroupName=$_."GroupName"
	$Destination=$_."DESTINATION"
	$Description=$_."DESCRIPTION"
	
	Write-Host "`n Creation du groupe : $GroupName -" -NoNewLine
	
	#AD Group creation
	New-ADGroup -name "$GroupName" -groupscope DomainLocal -GroupCategory Security -Description $Description -path $Destination
	
	#Check if group well created
	$testADGroup=Get-ADGroup $GroupName
	If($testADGroup){
		Write-Host " OK" -ForegroundColor:GREEN
		$success+=1
	}
	Else{
		Write-Host " KO" -ForegroundColor:RED
		$errors+=1
	}	

}

#Final 
$total=$success+$errors
Write-Host "`n `n $total groups created : `n "
Write-Host "           - $success" -NoNewLine -ForegroundColor:GREEN
Write-Host " groups created"
Write-Host "           - $errors" -NoNewLine -ForegroundColor:RED
Write-Host " groupes not created `n `n "

A quick Powershell script, easy to use, to create a lot of groups from a csv file

Read more

Active Directory – Get a Free Domain Controller

roualin powershell_2 Active Directory - Get a Free Domain ControllerIt could be really usefull to use the -DomainController parameter with many Powershell commands… But How to be sure to find an available DC ?

A little function will help you to do that :

Function Get_Domain_Controller {
$site = [System.DirectoryServices.ActiveDirectory.ActiveDirectorysite]::GetComputerSite()

$back = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().FindDomainController($site).Name
return $back
}

Read more
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site