Skip to content

Instantly share code, notes, and snippets.

View jstrong013's full-sized avatar

Jeremiah S jstrong013

View GitHub Profile
@jstrong013
jstrong013 / Create-WindowsUpdateCatalog.ps1
Created March 7, 2026 22:13 — forked from SMSAgentSoftware/Create-WindowsUpdateCatalog.ps1
Uses Microsoft Graph Windows Updates API to build a 'catalog' of Quality and Feature updates, Windows editions, servicing periods and known issues.
## ###########################################################################################
## Azure Automation Runbook to retrieve Windows Update Catalog entries from Microsoft Graph ##
##############################################################################################
#region ------------------------------------- Permissions -------------------------------------
# This runbook requires the following permissions:
# Delegated permissions:
# - WindowsUpdates.ReadWrite.All
# - Member of the'Intune Administrator' or 'Windows Update Deployment Administrator' Entra role
# Application permissions:
@jstrong013
jstrong013 / Invoke-ServiceUI.ps1
Created January 24, 2025 19:13 — forked from DanGough/Invoke-ServiceUI.ps1
Stub script for launching PSADT with ServiceUI only if a specific exe (explorer.exe by default) is running
<#
.SYNOPSIS
This is a helper script to launch Deploy-Application.exe via ServiceUI to force the process to become visible when deployed by Intune, or other deployment systems that run in session 0.
.DESCRIPTION
This will launch the toolkit silently if the chosent process (explorer.exe by default) is not running. If it is running, then it will launch the toolkit interactively, and use ServiceUI to do so if the current process is non-interactive.
An alternate ProcessName can be specified if you only want the toolkit to be visible when a specific application is running.
Download MDT here: https://www.microsoft.com/en-us/download/details.aspx?id=54259
There are x86 and x64 builds of ServiceUI avaiable in MDT under 'Microsoft Deployment Toolkit\Templates\Distribution\Tools'. Rename these to ServiceUI_x86.exe and ServiceUI_x64.exe and place them with this script in the root of the toolkit next to Deploy-Application.exe.
.PARAMETER ProcessName
Specifies the name of the process check for to trigger the interactive i
@jstrong013
jstrong013 / Create-SFEmployee.ps1
Last active September 26, 2021 02:29
Example code for how to create a ShareFile Employee account using PowerShell SDK
<# Answers the original question located on the ShareFile-PowerShell Repository Issues list (#66).
https://github.com/citrix/ShareFile-PowerShell/issues/66#issue-1001263931
#>
Add-PSSnapin ShareFile
$sfClient = New-SfClient -Name "$env:Temp\sfclient.sfps"
$sfEmployee = New-Object ShareFile.Api.Models.User
$sfEmployee.FirstName = 'First Name'
@jstrong013
jstrong013 / excuses.txt
Last active November 11, 2022 17:00
IT excuses. Original source from: http://pages.cs.wisc.edu/~ballard/bofh/excuses (lines 1-466). Additional lines added from friends, family, and random internet sources. Where possible, this description will be updated to include all sources where relevant or in the below comments.
clock speed
solar flares
electromagnetic radiation from satellite debris
static from nylon underwear
static from plastic slide rules
global warming
poor power conditioning
static buildup
doppler effect
hardware stress fractures
@jstrong013
jstrong013 / CopyInShareFileQuestion.ps1
Created December 19, 2019 03:33
Example code for Send-SfRequest to Copy Item - Citrix Community Answer
# Answers question generated here: https://community.sharefilesupport.com/citrixsharefile/topics/copy-sharefile-folder-to-another-sharefile-folder-with-powershell
# If above link is dead, web archive link: https://web.archive.org/web/20191219032922/https://community.sharefilesupport.com/citrixsharefile/topics/copy-sharefile-folder-to-another-sharefile-folder-with-powershell
Add-PSSnapin ShareFile
$sfClient = New-SfClient -Name "$env:Temp\sfclient.sfps"
$itemID = #ID of the item/file you are copying
$folderDestinationID = #ID of the parent folder you are copying the file into
# Question located here: https://community.sharefilesupport.com/citrixsharefile/topics/powershell-api-new-sfclient-giving-errors
#To create
Add-PSSnapin ShareFile
New-SFClient -Name $env:USERPROFILE\sfClient.sfps
# Enter Your ShareFile Credentials
# For future scripts, to use these credentials, you could do this:
Add-PSSnapin ShareFile
@jstrong013
jstrong013 / Sync-SfItem_Example1.ps1
Last active December 6, 2019 18:23
Example Code for Sync-SfItem - Citrix Community Answer
# Answers question Generated here: https://community.sharefilesupport.com/citrixsharefile/topics/sync-sfitem-command-not-working
Add-PSSnapin ShareFile
$sfClient = Get-SfClient -Name "$env:Temp\sfclient.sfps"
New-PSDrive -Name sfDrive -PSProvider ShareFile -Client $sfClient -Root "\"
# Name Used (GB) Free (GB) Provider Root
# ---- --------- --------- -------- ----
# sfDrive ShareFile \
Sync-SfItem -LocalPath "C:\PowerShell\ShareFile\TEST\*.txt" -Upload -ShareFilePath "sfDrive:\Folder Example" -OverWrite
# Sync operation successfully completed.