Skip to content

Instantly share code, notes, and snippets.

@Bill-Stewart
Bill-Stewart / AccessBasedEnumeration.psm1
Created April 27, 2018 20:36
Windows PowerShell module for managing access-based enumeration for shares
# AccessBasedEnumeration.psm1
# Written by Bill Stewart
#
# This Windows PowerShell module manages access-based enumeration for shares.
#
# Access-based enumeration causes the operating system to display only file
# system items that a user has permission to access. If a user does not have
# read (or equivalent) permissions for an item, the operating system hides the
# item from the user's view. Access-based enumeration is active only when
# viewing file system items from a share; it does not affect a user's view of
@Bill-Stewart
Bill-Stewart / Set-ServiceCredential.ps1
Created June 1, 2018 20:44
Sets start credentials for one or more services on one or more computers
# Set-ServiceCredential.ps1
# Written by Bill Stewart ([email protected])
#
# PowerShell script for setting credentials for one or more services on one or
# more computers.
#
# See http://www.itprotoday.com/management-mobility/changing-service-credentials-using-powershell
#requires -version 2
@Bill-Stewart
Bill-Stewart / Reset-LocalAccountPassword.ps1
Last active August 10, 2023 09:49
Securely reset local account or the local Administrator account (RID 500) passwords
# Reset-LocalAccountPassword.ps1
# Written by Bill Stewart (bstewart AT iname.com)
#requires -version 2
# Version history:
#
# 1.4 (2023-04-10)
# * Account for null account reference.
# * Refined code formatting.
@Bill-Stewart
Bill-Stewart / Get-BitLockerRecovery.ps1
Last active July 1, 2024 14:53
Gets BitLocker recovery information for one or more Active Directory computer objects
# Get-BitLockerRecovery.ps1
# Written by Bill Stewart (bstewart AT iname.com)
# Version history:
#
# 1.2 (2024-07-01)
# * Updated code formatting.
# * Changed PasswordID to PasswID.
#
# 1.1 (2019-09-12)
# Set-ScheduledTaskCredential.ps1
# Written by Bill Stewart ([email protected])
#requires -version 2
# Version history:
#
# Version 1.1 (18 Sep 2019)
# * Correct ShouldProcess (move to main process loop).
#
# Get-DirStats.ps1
# Written by Bill Stewart ([email protected])
#requires -version 2
# PowerShell wrapper script for the SysInternals du.exe command:
# https://docs.microsoft.com/en-us/sysinternals/downloads/du
# Why? Object output for sorting, filtering, calculating totals, etc.
#
# Version history:
# New-LocalUserAccount.ps1
# Written by Bill Stewart ([email protected])
#
# The impetus for writing this script is the deprecation of the 'Local Users
# and Groups' Group Policy Preference. You can use this script as a computer
# startup script to safely create a local account on computers.
#
# Version history:
#
# 1.0 (2018-08-20)
' EnforceLocalAdmin.vbs
' Written by Bill Stewart ([email protected])
'
' 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.
@Bill-Stewart
Bill-Stewart / Get-ADGroupMembership.ps1
Created December 2, 2019 19:44
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.
<#
@Bill-Stewart
Bill-Stewart / Get-InstalledApp.ps1
Last active September 3, 2024 16:57
Get-InstalledApp.ps1
# Get-InstalledApp.ps1
# Written by Bill Stewart ([email protected])
#
# 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.