Skip to content

Instantly share code, notes, and snippets.

View Smalls1652's full-sized avatar
😎

Timothy Small Smalls1652

😎
View GitHub Profile
[CmdletBinding()]
param(
)
class ReleaseBuild {
[string]$BuildNumber
[System.DateTime]$ReleaseDate
[bool]$IsPatchTuesdayRelease
[string]$KbArticleId
@Smalls1652
Smalls1652 / Invoke-DownloadWacInstaller.ps1
Created March 15, 2021 20:09
Download Windows Admin Center through PowerShell
<#PSScriptInfo
.VERSION 2021.03.00
.GUID 0bbe0f49-d3c4-4479-993f-0b7f824f9ace
.AUTHOR Tim Small
.COMPANYNAME Smalls.Online
[CmdletBinding(SupportsShouldProcess)]
param(
)
#The download URL for the Teams Machine-Wide Installer for x64 systems.
$teamsInstallDownloadUri = "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=windows&arch=x64&managedInstaller=true&download=true"
# -- Begin searching for a current install of Teams --
Write-Verbose "Looking for a current installation of Teams Machine-Wide Installer."
@Smalls1652
Smalls1652 / scriptable_df-feed-widget.js
Created October 7, 2020 01:41
Scriptable - Daring Fireball Feed Widget
/*
Created by: Smalls
Date Created: 2020-10-05
Last Updated: 2020-10-06
https://github.com/smalls1652
*/
async function getDfJsonFeed() {
//Get data from the DF JSON feed using 'Request'.
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(Position = 0)]
[ValidateSet("Up", "Down")]
[string]$ScrollDirection = "Down",
[Parameter(Position = 1)]
[switch]$ForAllNewProfiles
)
begin {
@Smalls1652
Smalls1652 / Invoke-RemediateCVE20201350.ps1
Created July 14, 2020 19:48
CVE-2020-1350 Remediation Script
<#
.SYNOPSIS
Remediate CVE-2020-1350 on Windows Server
.DESCRIPTION
Remediate the Windows Server DNS Server vulnerability for CVE-2020-1350 if the security update hasn't been applied to the server yet.
.PARAMETER RevertToDefault
Revert the changes back to default.
.PARAMETER DoNotRestartDnsService
Don't restart the DNS server service during script execution.
.NOTES
@Smalls1652
Smalls1652 / Invoke-SharepointRecycleBinRestore.ps1
Last active July 7, 2020 23:39
Restoring SPO Recycle Bin files
##Requires -Module @{ "ModuleName" = "pwsh-graph-connect" }
##Requires -Module @{ "ModuleName" = "SharePointPnPPowerShellOnline" }
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(Position = 0, Mandatory)]
[System.Uri]$SiteUri,
[Parameter(Position = 1, Mandatory)]
[Microsoft.Identity.Client.AuthenticationResult]$AuthToken,
[Parameter(Position = 2, Mandatory)]
[System.Collections.Generic.List[Microsoft.SharePoint.Client.RecycleBinItem]]$RecycleBinItems
@Smalls1652
Smalls1652 / README.My-PowerShell-Profiles.md
Last active September 1, 2020 15:53
My PowerShell Profiles

My PowerShell Profiles

My custom PowerShell profile

These are my personal PowerShell profiles with a customized prompt. The primary style of my prompt was to have a visual indicator as to what version of PowerShell I am running. I tend to work in PowerShell 7.0 more than PowerShell 5.1; however, due to some compatability issues with 7.0, I have to flip-flop between the two. Most of my compatability concerns lie with some Microsoft modules not supporting .NET Core yet (Crazy, right?) or if I have to do something that can only be done in 5.1.

On Windows, I even have it change the > to a $ when running in an administrator context.

PowerShell prompt in admin context