Skip to content

Instantly share code, notes, and snippets.

@potatoqualitee
potatoqualitee / Save-KBFile.ps1
Last active July 5, 2024 11:31
Download Windows patch files / KB (patchid like KBxxxxx) and save them to disk using PowerShell
function Save-KBFile {
<#
.SYNOPSIS
Downloads patches from Microsoft
.DESCRIPTION
Downloads patches from Microsoft
.PARAMETER Name
The KB name or number. For example, KB4057119 or 4057119.
@theinventor
theinventor / syncro-sample-rest-api.ps1
Last active September 29, 2021 23:27
A sample powershell script with some functions to work with the SyncroMSP HTTP REST API
Import-Module $env:SyncroModule
###########################################################################################
# First, some functions, these are just declarations that get used lower down the script. #
###########################################################################################
function Query-Syncro-Tickets ($SyncroSubdomain,$SyncroAPIKey,$Query) {
$uri = "https://$SyncroSubdomain.syncromsp.com/api/v1/tickets?api_key=$SyncroAPIKey&query=$Query"
$response = Invoke-RestMethod -Uri $uri
$response