Skip to content

Instantly share code, notes, and snippets.

@jacobsalmela
jacobsalmela / autoDeployWindows.bat
Last active September 30, 2021 21:24
Script for WinPE to auto deploy a Windows 10 image.
echo select disk 0 > diskpart%ID%.txt
echo clean >> diskpart%ID%.txt
echo ** Creating system reserved partition...
echo create partition primary size=500 >> diskpart%ID%.txt
echo select partition 1 >> diskpart%ID%.txt
echo active >> diskpart%ID%.txt
echo format quick fs=ntfs >> diskpart%ID%.txt
echo assign letter="r" >> diskpart%ID%.txt
@wpsmith
wpsmith / Get-SPLicenseKey.ps1
Created February 5, 2015 19:35
PowerShell: Gets SharePoint License Key for SharePoint Server 2007, 2010, or 2013.
<#
.SYNOPSIS
Gets the SharePoint License Key for 2007, 2010, or 2013
.DESCRIPTION
Gets the SharePoint License Key for 2007, 2010, or 2013.
.PARAMETER version
Version of SharePoint installed.
@janikvonrotz
janikvonrotz / Update-SPTokenLifetime.ps1
Created April 3, 2014 07:48
PowerShell: Update SharePoint Token Lifetime #SharePoint #PowerShell
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
# update SharePoint cache token lifetime
$SPContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$SPContentService.TokenTimeout = (New-TimeSpan -minutes 5)
$SPContentService.Update()
# udpate SharePoint claims token lifetime