Skip to content

Instantly share code, notes, and snippets.

View HolgerLutz's full-sized avatar

Holger Lutz HolgerLutz

  • Microsoft Corporation
  • Germany
View GitHub Profile
@HolgerLutz
HolgerLutz / gist:aed9058c1a82829f7241ebccb70fbcf5
Created October 10, 2025 11:49
Onboard-CloudHybridSearch-SPOONS-S2S
<#
.SYNOPSIS
When you run this script you onboard your SharePoint Online (SPO) tenant and your SharePoint Server Cloud SSA to cloud hybrid search.
This includes setting up server-to-server authentication between SharePoint Online and SharePoint Server.
.PARAMETER PortalUrl
SharePoint Online portal URL, for example 'https://contoso.sharepoint.com'.
.PARAMETER CloudSsaId
Name or ID (Guid) of the Cloud Search Service Application, created with the CreateCloudSSA script.
.PARAMETER Credential
Logon credential for admin account. Will prompt for credential if not specified.
# Re-Enable NGen images
function Remove-IniFile {
param([string]$filePath)
$fileInfo = Get-Item -LiteralPath $filePath
$fileSize = $fileInfo.Length
$expectedSize = ($content.Length + 2) * 2 + 2 # Accounting for BOM and line endings
if ($fileSize -eq $expectedSize) {
# Disable NGen Images
$content = "[.NET Framework Debugging Control]`r`nGenerateTrackingInfo=1`r`nAllowOptimize=0"
function Create-IniFile {
param([string]$filePath)
try {
Out-File -LiteralPath $filePath -InputObject $content -Force
$Script:written++
return ""
2.11.1.0
@HolgerLutz
HolgerLutz / version.txt
Last active November 21, 2023 13:45
Current version of SPCUIT (SharePoint on-premises Cumulative Update Install Tool)
1.23.1121
@HolgerLutz
HolgerLutz / RoiScan.vbs
Created October 1, 2021 09:26
RoiScan - Robust Office Inventory Scan - Version 1.9.3.3
' Name: Robust Office Inventory Scan - Version 1.9.3.3
' Author: Microsoft Customer Support Services
' Copyright (c) Microsoft Corporation. All rights reserved.
' Script to create an inventory scan of installed Office applications
' Supported Office Families: 2000, 2002, 2003, 2007
' 2010, 2013, 2016, 2019
' 2021, O365
Option Explicit
On Error Resume Next
@HolgerLutz
HolgerLutz / SharePoint2019Prerequisites.Tests.ps1
Created September 17, 2021 07:16 — forked from joerodgers/SharePoint2019Prerequisites.Tests.ps1
Example Pester Test that checks if all the mandatory prerequisites are installed on a list of servers.
function Test-ProductInstalled
{
[cmdletbinding()]
param
(
[parameter(Mandatory=$true)]
[string]$ComputerName,
[parameter(Mandatory=$true)]
[string]$ProductName
@HolgerLutz
HolgerLutz / SPGetOneTimeTimerJobs.ps1
Created November 9, 2018 08:01
List One-Time SharePoint TimerJobs
Get-SPTimerJob | ?{$_.schedule.description -eq "One-time"} |select displayname,server,locktype,lastruntime | fl
@HolgerLutz
HolgerLutz / pctalk.ps1
Created November 7, 2018 16:00
[PS] Text to Speech
Add-Type -AssemblyName System.speech
$PCTalk = New-Object System.Speech.Synthesis.SpeechSynthesizer
$TextToSpeech = @("
This is the text which gets spoken by the computer,
Cheers ")
$PCTalk.Speak($TextToSpeech)