Script Library

A collection of scripts for usage as you see fit. We are not responsible for any ill-effects that occur due to usage of the scripts below. Run scripts in your environment responsibly!

Standalone Scripts

Title Functionality Language
Add List of Computers to a List of AD Groups Adds a designated List of Computers to a designated List of AD Groups PowerShell
Automate-MaintenanceMode.ps1 Automatically handle maintenance mode Powershell
Build-BoundaryReport.ps1 Boundary Summary Report Powershell
Build-PrintGPOsFromPrintServer.ps1 Build out Group Policy Preference Printing GPOs with PowerShell PowerShell
Check-AppsNotEnabledForTaskSequenceInstall.ps1 Ensures Install From Task Sequence is enabled for application packages PowerShell
Check-CMForUpdateStatus.ps1 Checks if ConfigMgr is running an update PowerShell
Check-Windows11Compatibility.ps1 Task Sequence PowerShell Script to check for Windows 11 Compatibility PowerShell
Cleanup-InternetExplorerPinsAndShortcuts.ps1 Cleanup IE Pins and Shortcuts PowerShell
Configure-AllowanceOf3rdPartyUpdates.ps1 Allow 3rd Party Updates to Install During OSD Imaging PowerShell
Configure-DefaultLockScreen.ps1 Configure Default Lock Screen PowerShell
Configure-DefaultUserProfile.ps1 Configure Default User Profile PowerShell
Copy GPO Links 2.0 Copies GPO links, link order, and link enforcements from a source OU to a list of destination OUs PowerShell
Copy Group Members Copy Members of one Active Directory group to Another PowerShell
Correct-ContentDistributionErrors.ps1 automate redistribution of failed packages PowerShell
Correct-PendingContentOnSpecificDP.ps1 Correct Content Library Variances on a Distribution Point PowerShell
Decline-SupersededUpdatesWithExclusionPeriod WSUS Cleanup and Maintenance of Superseded Updates. PowerShell
Example: Remove an object in an array list by value of object property Remove an object in an array list by value of object property PowerShell
Extract All Files Of Type To Same Named Dir Extract All Files Of Type To Same Named Directory PowerShell
Find Set GPO Settings Via Keywords Find Set GPO Settings Search via Keyword PowerShell
Fix-MissingRMSTemplates Fix Missing RSM Templates
Fix-OrphanedDPs.ps1 Remove orphaned Distribution Point from the ConfigMgr site database PowerShell
Generate-ADOrgTreeInfoReport.ps1 Outputs relevant org tree info from AD PowerShell
Get-PrimaryUserDevicesForAnADGroup.ps1 List of Computers for a Group of Users PowerShell
Invoke-SQL SQL Query with PowerShell PowerShell
Link GPO to All Computer OUs Link GPO to All Computer OUs PowerShell
Link List of GPOs to List of OUs Links GPOs provided in a supplied list to OUs provided in a supplied list. PowerShell
Link List of GPOs to Sub OUs Based On OU Name Link GPOs to Sub OUs Based On OU Name PowerShell
Maintain-IISLogs.ps1 Clean up logs in the IIS logging directory over x days old. PowerShell
Match-UserPrincipalNamesToMailAttribute.ps1 Ensures UPNs match mail attributes PowerShell
Monitor-BITSTransferStatus.ps1 Monitor BITS transfers Powershell
Re-Add Microsoft Store App Reinstall Microsoft Store App PowerShell
Remove Computer From AD Group Simple Script to Remove Specified Computer From Specified AD Group PowerShell
Remove List of Computers from a List of AD Groups Removes a designated list of computers from a designated list of AD groups. PowerShell
Remove-ProvisionedApps.ps1 Removes Unwanted AppX Packages PowerShell
Replace User Accounts in a Group With Computer Accounts Replace user objects in a group with the computer object of the same name PowerShell
Replace-AllUsersLayoutModification.xml.ps1 Update LayoutModification.xml for all users PowerShell
Run-GPUpdateSilently.ps1 Run GPUpdate Silently on collections from ConfigMgr console PowerShell
Run-StorageSpaceClanup.ps1 Cleanup Disk Space PowerShell
SCCM Script: GPUpdate (Silently) with Logging and Success and Failure Output GPUpdate collections silently from ConfigMgr console PowerShell
SMSTS Initialization Helper Fix ConfigMgr Client never initializing during in place upgrade Task Sequence PowerShell
Translate-SubtitlesFile.ps1 Translates SRT subtitle file to target language PowerShell

Console Scripts

Title Functionality Language
Run-GPUpdateSilently.ps1 Run GPUpdate Silently on collections from ConfigMgr console PowerShell
Run-StorageSpaceClanup.ps1 Cleanup Disk Space PowerShell

Application Packaging/Adjustment/Shimming Functions

The functions below are originally intended for use in application package and application adjustment (shimming) package scripts.

Add Script

Title Functionality Language
Add-FirewallRule Function to add a firewall rule Powershell
Enable-WindowsFirewallService Enable Windows Firewall service Powershell
ErrorOut-Script Error Out Package Script Powershell
Log-Action Package logging function Powershell
Set-AppDirPermissions Grant users modify access to directories Powershell
Set-AppFilePermissions Modify File Permissions Powershell
Set-AppRegPermissions Modify Registry Permissions Powershell
Set-RegistryValue Sets a Registry Value PowerShell
Set-WindowsFirewallActive Set Windows Firewall to Active state Powershell
Take-SystemOwnerShipAndAllowModify Take ownership as system and grant system modify of a file PowerShell
Template: Application Adjustments Template Sample for Application Packaging or Adjustments (Shimming) Powershell

Vendor Links

Error | visuaFUSION Systems Solutions Blog

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /mnt/home/visuafus/public_html/bahusa.net/includes/common.inc:2861) in drupal_send_headers() (line 1551 of /mnt/home/visuafus/public_html/bahusa.net/includes/bootstrap.inc).
  • Error: Call to undefined function mail() in DefaultMailSystem->mail() (line 79 of /mnt/home/visuafus/public_html/bahusa.net/modules/system/system.mail.inc).

Error

The website encountered an unexpected error. Please try again later.