Create SPGroups with PowerShell

You can create via PowerShell SharePoint Groups for a specific SiteCollection.

$siteURL = “http://intramania.com/sites/mysitecollection
$web = Get-SPWeb $siteURL
$groups = $web.SiteGroups
$groups.Add(“My-Group-Name-01”, $web.CurrentUser, $null, “SharePoint Group Name 01”)
$groups.Add(“My-Group-Name-02”, $web.CurrentUser, $null, “SharePoint Group Name 02”)
$groups.Add(“My-Group-Name-03”, $web.CurrentUser, $null, “SharePoint Group Name 03”)
$groups.Add(“My-Group-Name-04”, $web.CurrentUser, $null, “SharePoint Group Name 04”)
$groups.Add(“My-Group-Name-05”, $web.CurrentUser, $null, “SharePoint Group Name 05”)

PowerShell: Get creation date of all Site Collection in farm

Get creation date of all site collections in all Web-applications:

$Sites=@();
Get-SPSite -limit ALL|%{
$RootWeb = $_.RootWeb;
$Created = $RootWeb.Created;
$Sites += New-Object PSObject -Property @{SiteUrl=$RootWeb.Url; Created=$Created}
write-host $Sites
$RootWeb.Dispose();
$_.Dispose();
}
$Sites|Export-CSV “C:\SiteCollectionCreated.csv” -NoTypeInformation;