Skip to content

Instantly share code, notes, and snippets.

// 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;
# Get-Uptime.ps1
# Written by Bill Stewart (bstewart AT iname.com)
#
# Outputs uptime for one or more computers. Uptime is determined by the
# LastBootUpTime property from the Win32_OperatingSystem WMI class.
#requires -version 3
<#
.SYNOPSIS
# Reset-DhcpServerDnsCredential.ps1
# Written by Bill Stewart (bstewart AT iname.com)
# Script prerequisites: PowerShell ActiveDirectory and DhcpServer modules
# On a Windows server, you can meet these prerequisites by installing the
# following feature administration tools found in Remote Server Administration
# Tools:
# * AD DS and AD LDS Tools: Active Directory Module for Windows PowerShell
# * DHCP Server Tools
# Rename-ScheduledTask.ps1
# Written by Bill Stewart (bstewart AT iname.com)
#requires -version 3
<#
.SYNOPSIS
Renames a scheduled task on a computer by copying an existing task to a new task, then deleting the original task.
.DESCRIPTION
# Get-ComputerGroupMembership.ps1
#requires -version 3
#requires -RunAsAdministrator
<#
.SYNOPSIS
Gets a computer's group memberships based on resultant set of policy (RSOP) data.
.DESCRIPTION
@Bill-Stewart
Bill-Stewart / Get-Message.ps1
Last active May 14, 2024 15:40
Get-Message.ps1
# Get-Message.ps1
# Written by Bill Stewart (bstewart AT iname.com)
# Version history:
#
# 0.1.0 (2023-07-11)
# * Initial version.
#
# 1.0.0 (2024-05-14)
# * Improved: MessageId parameter now allows unsigned 32-bit values.
@Bill-Stewart
Bill-Stewart / UserAccountControl.hta
Last active August 10, 2023 09:50
UserAccountControl.hta
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!--
UserAccountControl.hta Written by Bill Stewart (bstewart AT iname.com)
Provides a simple GUI for examining and toggling individual bits for the
Active Directory userAccountControl attribute.
Enter the userAccountControl attribute into the box at the top of the form
@Bill-Stewart
Bill-Stewart / FixUnquotedServicePaths.js
Last active August 10, 2023 09:50
FixUnquotedServicePaths.js
// FixUnquotedServicePaths.js
// WSH script written by Bill Stewart (bstewart AT iname.com)
//
// Corrects each service on the local machine that has an "unquoted service
// path" and logs its actions to the application event log.
//
// The idea here is to run this as a computer startup script, so that unquoted
// service paths will get identified and corrected automatically at every
// reboot.
//
# Get-ADGroupMember.ps1
# Written by Bill Stewart
#requires -version 2
# Version history:
# 1.0 (2019-12-04)
# * Initial version. Only searches the current domain.
#
@Bill-Stewart
Bill-Stewart / Update-LibreOffice.ps1
Last active August 10, 2023 09:50
Update-LibreOffice.ps1
# Update-LibreOffice.org
# Written by Bill Stewart (bstewart AT iname.com)
#requires -RunAsAdministrator
#requires -Version 5
<#
.SYNOPSIS