Skip to content

Instantly share code, notes, and snippets.

View fatherjack's full-sized avatar
💭
doing things

fatherjack

💭
doing things
View GitHub Profile
@fatherjack
fatherjack / WSUS offline updates
Last active September 5, 2018 10:19
Sometimes you cant get a WSUS update from the internet as the WSUS server is on an air-gapped network. Get the cab file from these links and save it to the root of C: on the update server.
Need an offline version of a WSUS update file ?
Go to:
https://blogs.technet.microsoft.com/mempson/2011/08/23/wsusscn2-cab-manual-download-location/
the link then takes you to where the CAB actually comes from:
http://go.microsoft.com/fwlink/?LinkId=76054
# i - copy the complete URL from your browser
# ii - run this line of powershell
# iii - go to document and paste
# iv - content pasted is the title of the web page
# useful for when you want to build aset of reference and need page title and url in the document
(((Get-Clipboard).Split('/')[-1]).Split('?')[0]).Replace("-", " ") | Set-Clipboard
Function Update-SysInternals {
<#
.Synopsis
PowerShell script to update Sysinternals tools
.DESCRIPTION
Creates a PSDrive mapped to '\\live.sysinternals.com\tools' and then copies tools that are new or have a different byte length
NOTE: Needs to run with elevated permissions.
@fatherjack
fatherjack / PowerShell Prompt.ps1
Last active August 23, 2019 21:32
provides some useful information to your PowerShell prompt
function Prompt {
<#
.Synopsis
Your custom PowerShell prompt
# borrowing heavily from https://dbatools.io/prompt but formatting the execution time without using the DbaTimeSpanPretty C# type
.Description
Custom prompt that includes the following features: