Skip to content

Instantly share code, notes, and snippets.

@Bill-Stewart
Bill-Stewart / UserAccountControl.hta
Last active February 15, 2023 00:14
UserAccountControl.hta
View 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 November 28, 2022 18:35
FixUnquotedServicePaths.js
View 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.
//
View Get-ADGroupMember.ps1
# 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 February 14, 2023 20:21
Update-LibreOffice.ps1
View Update-LibreOffice.ps1
# Update-LibreOffice.org
# Written by Bill Stewart (bstewart AT iname.com)
#requires -RunAsAdministrator
#requires -Version 5
<#
.SYNOPSIS
View Update-FileText.ps1
# Update-FileText.ps1
# Written by Bill Stewart (bstewart@iname.com)
#requires -version 2
<#
.SYNOPSIS
Updates text in files using a regular expression.
.DESCRIPTION
View Remove-DSACE.ps1
# -----------------------------------------------------------------------------
# Remove-DSACE.ps1
# Written by Bill Stewart (bstewart@iname.com)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# This is a PowerShell script replacement for dsrevoke.exe:
# http://www.microsoft.com/en-us/download/details.aspx?id=19288
#
# Why write a replacement?
@Bill-Stewart
Bill-Stewart / getwinmsgs.pp
Created April 6, 2020 17:07
getwinmsgs.pp - FPC program to output Windows error codes and descriptions as CSV
View getwinmsgs.pp
{$MODE OBJFPC}
{$H+}
{$APPTYPE CONSOLE}
program getwinmsgs;
uses
windows;
var
@Bill-Stewart
Bill-Stewart / Get-InstalledApp.ps1
Created January 13, 2020 22:11
Get-InstalledApp.ps1
View Get-InstalledApp.ps1
# Get-InstalledApp.ps1
# Written by Bill Stewart (bstewart@iname.com)
#
# Outputs installed applications on one or more computers that match one or
# more criteria.
#
# Version history:
#
# Version 1
# * Written for PowerShell 1.0. Lost in the mists of time.
@Bill-Stewart
Bill-Stewart / Get-ADGroupMembership.ps1
Created December 2, 2019 19:44
Get-ADGroupMembership.ps1
View Get-ADGroupMembership.ps1
# Get-ADGroupMembership.ps1
# Written by Bill Stewart
#requires -version 2
# Version history:
# 1.0 (2019-12-02)
# * Initial version. Only searches the current domain.
<#
View EnforceLocalAdmin.vbs
' EnforceLocalAdmin.vbs
' Written by Bill Stewart (bstewart@iname.com)
'
' This VBScript script allows you to update the membership of the
' Administrators group on one or more computers.
'
' The first unnamed argument is a comma-delimited list of accounts.
'
' Without /addonly or /removeonly, the Administrators group should contain only
' the named accounts.