Skip to content

Instantly share code, notes, and snippets.

View cloudchristoph's full-sized avatar
🏠
Working from home

Christoph Vollmann cloudchristoph

🏠
Working from home
View GitHub Profile
# Change VM names to your own names
$baseVMs = @("ROUTER","AD")
$sqlVMs = @("SPSQL2016")
$sharepointVMs = @("SP2016-1","SP2016-2")
# -------------------------------------------------------------------------------------------------
function Start-VMSet($vmSet){
asnp *share*
write-host "Getting timerjob definitions..."
$jobs = Get-SPTimerJob | ? {$_.Title -like "Health Analysis Job*"}
if (!$jobs -or $jobs.Count -eq 0) {
# Maybe in German? :)
$jobs = Get-SPTimerJob | ? {$_.Title -like "Integritätsanalyseauftrag*"}
}
param(
[Parameter(Mandatory=$true)][string]$BackupPath,
[bool]$DateTimePrefix = $true,
[bool]$OverwriteExistingBackups = $false
)
if ($DateTimePrefix) {
$date_time_prefix = Get-Date -Format "yyMMdd_HHmmss_"
} else {
$date_time_prefix = "";
param(
[string]$BuildVersion = ""
)
#Patch-Level der SharePoint Farm prüfen
$apiUrl = "https://sharepointupdates.com/api/articles/"
if ($BuildVersion -eq "") {
write-host "Lese Farm-Info..." -f Gray
asnp *share*
$BuildVersion = (Get-SPFarm).BuildVersion.ToString()
@cloudchristoph
cloudchristoph / Add-SharePointSiteExternalUser.ps1
Created September 6, 2016 12:48 — forked from markekraus/Add-SharePointSiteExternalUser.ps1
PowerShell function to invite an external user or list of external users to a SharePoint site
<#
.SYNOPSIS
Invites an external user or list of external users to a SharePoint site.
.DESCRIPTION
Invites an external user or list of external users to a SharePoint site.
External users can be granted View, Edit, or Owner permissions within
the site. A custom e-mail message can be included or the invitation email
can be suppressed.
.PARAMETER SiteURL
URL string of the SharePoint site to which the user(s) will be invited.