Skip to content

Instantly share code, notes, and snippets.

# Update-VirtualBoxWindowsAdditions.ps1
# Written by Bill Stewart (bstewart AT iname.com)
#
# Updates the VirtualBox Guest Additions on a VirtualBox VM.
#
# Prerequisites:
# * The VirtualBox Guest Additions ISO must be mounted in a VM optical drive
# * The Guest Additions must already be installed
#
# Version history:
# Start-ScheduledTaskCommand.ps1
# Written by Bill Stewart (bstewart AT iname.com)
# This script provides a simple way to execute a command one one or more remote
# computers using the Task Scheduler service. Uses the Task Scheduler scripting
# objects:
# https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-objects
# If you're using the Windows firewall, you'll need the 'Remove Scheduled Tasks
# Management' inbound rules (or equivalent) in place on remote machines.
# New-OpenSSLCertReq.ps1
# Written by Bill Stewart (bstewart AT iname.com)
#requires -version 3
<#
.SYNOPSIS
Generates a private key and certificate signing request (CSR) using OpenSSL.
# Wait-NetConnectionDomain.ps1
# Written by Bill Stewart
# Under certain circumstances, Windows might not detect it's network location
# correctly. The most obvious manifestation of this problem is that the Windows
# Firewall 'profile' gets set to the wrong network. On a domain, this can be a
# headache when firewall rules are set to only be active for the 'Domain'
# firewall profile. It seems that, under some conditions on domain-joined
# computers, the Network Location Awareness (NlaSvc) service doesn't update
# its status correctly.
#requires -version 5.1
# Get-X509Event.ps1
# Written by Bill Stewart (bstewart AT iname.com)
#
# Gets X.509 "no strong mapping" certificate events from domain controllers.
# See Microsoft article KB5014754 for more information.
#
# Version History
#
# Get-X509Value.ps1
#
# Written By Bill Stewart (bstewart AT iname.com)
#
# This script uses 'certutil -scinfo -silent' to get all smart card certificate
# SHA1 hashes (aka "thumbprints") from an inserted smart card. Of these
# certificates, the script selects those certificates that are used for smart
# card logon and have a valid date, and presents a selectable list of
# certificates to the user. After the user selects a certificate, the script
# outputs an object with the following properties:
// MSIInfo.js
// Written by Bill Stewart (bstewart AT iname.com)
// Outputs properties from an MSI database.
var SCRIPT_NAME = "MSIInfo.js";
// This array specifies the property names the script will handle.
var VALID_PROPERTIES = ["Manufacturer","ProductName","ProductVersion",
"ProductCode","UpgradeCode"];
# Get-HexDump.ps1
# Written by Bill Stewart (bstewart AT iname.com)
# Version history:
#
# 1.0 (2012-06-29)
# * Initial version.
#
# 1.1 (2017-03-24)
# * Slight performance improvement (don't keep recreating buffer).
// ZoneConfig.js
// Configures browser security zone settings.
// Written by Bill Stewart (bstewart AT iname.com)
// Designed to run as a logon script from a GPO; example:
// Script: %SystemRoot%\System32\cscript.exe
// Parameters: \\<domainname>\NETLOGON\ZoneConfig.js
// For details on settings, see:
// Renamer.js
// Written by Bill Stewart (bstewart AT iname.com)
//
// Renames files and/or directories using regular expressions.
var SCRIPT_NAME = "Renamer.js",
ERROR_INVALID_PARAMETER = 87;
var FSO;