This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-16"?> | |
| <Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
| <RegistrationInfo> | |
| <Author>[email protected]</Author> | |
| <Description>Restarts the Network Location Awareness following an LDAP authentication failure (typically due to a DC being temporarily unavailable during an update cycle)</Description> | |
| <URI>\Remediate Network Location Awareness</URI> | |
| </RegistrationInfo> | |
| <Triggers> | |
| <EventTrigger> | |
| <Enabled>true</Enabled> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name: Remove-dbutil.ps1 | |
| # Author: James Schlackman | |
| # Last modified: May 4, 2021 | |
| # Remediation of CVE-2021-21551 / DSA-2021-088 | |
| # Implements remediation Step 1, Option 2 from | |
| # https://www.dell.com/support/kbdoc/en-us/000186019/dsa-2021-088-dell-client-platform-security-update-for-dell-driver-insufficient-access-control-vulnerability | |
| $CheckPaths = (Get-ChildItem -Attributes d -Path $env:SystemDrive\Users | Select -Property @{Label="FullName";Expression={$($_.Fullname) + "\AppData\Local\Temp"}}) + (Get-Item -Path $env:SystemRoot\Temp | Select FullName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Toggles the status of self-service purchase for eligible Microsoft 365 products. | |
| .DESCRIPTION | |
| Gets the list of Microsoft 365 product licenses that are available for self-service purchase and allows the status of selected products to be toggled (e.g. Enabled set to Disabled and vice-versa) | |
| Author: James Schlackman <[email protected]> | |
| Last Modified: March 6 2025 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name: Remove-DisabledUnifiedGroupOwners.ps1 | |
| # Author: James Schlackman | |
| # Last Modified: Oct 18 2023 | |
| # | |
| # Checks all Office 365 Unified Groups for owners that have their accounts disabled, and removes them as owner. | |
| # If the group would be left with no owners, find the first non-disabled member and promote them. | |
| #Requires -Modules ExchangeOnlineManagement | |
| Import-Module ExchangeOnlineManagement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Sets up a daily shadow copy on a specified drive. | |
| .DESCRIPTION | |
| Sets up a daily shadow copy on a specified drive, which enables 'Previous Versions' functionality on non-server editions of Windows. | |
| The maximum shadow copy storage space will be set to 10% to accomodate storage needed for the shadow copies. | |
| Optionally also enables System Restore functionality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0.0.0.0/5 | |
| 8.0.0.0/7 | |
| 11.0.0.0/8 | |
| 12.0.0.0/6 | |
| 16.0.0.0/4 | |
| 32.0.0.0/3 | |
| 64.0.0.0/2 | |
| 128.0.0.0/3 | |
| 160.0.0.0/5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Gets the public TLS certificate from a remote server. | |
| .DESCRIPTION | |
| Connects to a specified server and port and initiates a TLS handshake to retrieve the remote public certificate. | |
| Optionally also returns a PEM-encoded version of the certificate. | |
| Adapted from script by Rob VandenBrink at https://isc.sans.edu/forums/diary/Assessing+Remote+Certificates+with+Powershell/20645/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dim objNetwork, strRemoteShare | |
| Set objNetwork = CreateObject("WScript.Network") | |
| Dim oFileSys | |
| Set oFileSys = CreateObject("Scripting.FileSystemObject") | |
| ' Read home drive info directly from AD in case environment variables are blank | |
| Dim objSysInfo, objUser | |
| Set objSysInfo = CreateObject("ADSystemInfo") | |
| ' Get currently logged in user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name: Disable-ExpiredAccounts.ps1 | |
| # Author: James Schlackman | |
| # Last Modified: June 5 2020 | |
| # Queries AD for any expired account that is not already disabled, and disables it. | |
| Get-ADUser -LDAPFilter "(&(accountExpires<=$((Get-Date).ToFileTime()))(!accountExpires=0)(!userAccountControl:1.2.840.113556.1.4.803:=2))" | Disable-ADAccount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name: Cleanup-UngroupedDriverPackages.ps1 | |
| # Author: James Schlackman | |
| # Last Modified: Sep 10 2021 | |
| # Gets details of all driver packages in WDS that are not assigned to a driver group, and optionally removes them. | |
| # Must be run on the target WDS server with administrative privileges. | |
| $AllPackageIDs = (wdsutil /get-alldriverpackages | Select-String "^Id: ({.*})" | ForEach-Object {$_.Matches.Groups[1].Value}) | |
| Write-Output "Total driver packages on server: $($AllPackageIDs.Count)" |