Skip to content

Instantly share code, notes, and snippets.

@deadlydog
deadlydog / PowerShellSingleFileScriptTemplate.ps1
Last active October 1, 2025 07:26
PowerShell template for a single-file script
<#
.SYNOPSIS
PUT SHORT SCRIPT DESCRIPTION HERE AND ADD ANY ADDITIONAL KEYWORD SECTIONS AS NEEDED (.PARAMETER, .EXAMPLE, ETC.).
#>
[CmdletBinding()]
param (
# PUT PARAMETER DEFINITIONS HERE AND DELETE THIS COMMENT.
)
process {
@indented-automation
indented-automation / Get-InstalledSoftware.ps1
Last active November 19, 2025 16:23
Get-InstalledSoftware
function Get-InstalledSoftware {
<#
.SYNOPSIS
Get all installed from the Uninstall keys in the registry.
.DESCRIPTION
Read a list of installed software from each Uninstall key.
This function provides an alternative to using Win32_Product.
.EXAMPLE
Get-InstalledSoftware
@PSJoshi
PSJoshi / block-macro-ms-office.txt
Created April 19, 2017 10:03
Block macros in Microsoft Office suite using registry
Block Macro in Microsoft office using Windows registry keys
============================================================
(ref - https://www.slipstick.com/outlook/block-macros-office-20132016/)
Office 2016
------------
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\office\16.0\word\security
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\office\16.0\excel\security
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\office\16.0\powerpoint\security
In each key listed above, create this value: