Added Tags to All Docs

This commit is contained in:
2026-01-28 20:41:51 -07:00
parent fb2eed3cce
commit fb67ebe7f5
195 changed files with 1335 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
---
tags:
- PowerShell
- Email
- Scripting
---
!!! info "Prerequesite: [Connect to Azure AD](./connect-to-azure-ad.md)"
The uppercase `SMTP` address is the primary address, while lowercase `smtp` are aliases. You can find the value in active directory in **"User > Attribute Editor > proxyAddresses"**.

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
**Purpose**: Sometimes you will need to connect to Azure AD via powershell in order to perform troubleshooting / automation.
## Update Nuget Package Manager

View File

@@ -1,3 +1,10 @@
---
tags:
- Exchange Online
- PowerShell
- Scripting
---
**Purpose**: Sometimes you will need to connect to Office365 via powershell in order to perform troubleshooting / automation that either is too complex to do via the website, or is not exposed / possible to do via the website.
## Update Nuget Package Manager

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
**Purpose**:
Sometimes you just need a basic script that outputs a pretty directory and file tree. This script offers files and folders to ignore, and outputs a fancy directory tree.

View File

@@ -1,3 +1,10 @@
---
tags:
- DNS
- PowerShell
- Scripting
---
## Purpose
When it comes to best-practices with Windows-based DNS servers, you never want to have `127.0.0.1` or the IP of the server itself as the primary DNS server, you want to have a *different* DNS server as primary, and `127.0.0.1` as the secondary or tertiary DNS server instead.

View File

@@ -1,3 +1,10 @@
---
tags:
- PowerShell
- File Management
- Scripting
---
**Purpose**:
Locate specific files, and copy them with a renamed datestamp appended to a specific directory.

View File

@@ -1,3 +1,10 @@
---
tags:
- Windows
- PowerShell
- Scripting
---
## Purpose
Sometimes when you try to run Windows Updates, you may run into issues where updates just fail to install for seemingly nebulous reasons. You can run the following commands (in order) to try to resolve the issue.

View File

@@ -1,3 +1,10 @@
---
tags:
- Group Policy
- PowerShell
- Scripting
---
``` powershell
$computers = Get-ADComputer -Filter * -SearchBase "OU=Computers,DC=bunny-lab,DC=io"
$computers | ForEach-Object -Process {Invoke-GPUpdate -Computer $_.name -RandomDelayInMinutes 0 -Force}

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
## Purpose
This script is designed to iterate over every computer device within an Active Directory Domain. It then reaches out to those devices over the network and iterates upon every local user profile on those devices, and using CIM, determines which profiles have not been logged into in X number of days. If executed in a non-dry-run nature, it will then delete those profiles (*this does not delete local or domain users, it just cleans up their local profile data on the workstation*).

View File

@@ -1,3 +1,10 @@
---
tags:
- Rclone
- PowerShell
- Scripting
---
Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces. Over 70 cloud storage products support rclone including S3 object stores, business & consumer file storage services, as well as standard transfer protocols.
!!! warning "Be Mindful of Sync Type"

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
**Purpose**:
Sometimes you need to restart a service across every computer in an Active Directory Domain. This powershell script will restart a specific service by name domain-wide. Each device will be processed in a serialized nature, one-by-one.

View File

@@ -1,3 +1,11 @@
---
tags:
- Windows 11
- Windows
- PowerShell
- Scripting
---
**Purpose**:
You may need to upgrade a device to Windows 11 using an ISO stored on a UNC Network Share, the script below handles that.

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
## Purpose
Sometimes things go awry with backup servers and Hyper-V and a bunch of extra `.avhdx` virtual differencing disks are created, taking up a ton of space. This can be problematic because if you run out of space, the virtual machines running on that underlying storage will stop working. Sometimes this can involve dozens or even hundreds of differencing disks in rare cases that need to be manually merged or "collapsed" down to reclaim the lost space.

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
**Purpose**:
You may find that you cannot delete a VHDX file for a virtual machine you removed from Hyper-V and/or Hyper-V Failover Cluster, and either cannot afford to, or do not want to reboot your virtualization host(s) to unlock the file locked by `SYSTEM`.

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
**Purpose**: Sometimes a Hyper-V Failover Cluster node does not want to shut down, or is having issues preventing you from migrating VMs to another node in the cluster, etc. In these situations, you can run this script to force a cluster node to reboot itself.
!!! warning "Run from a Different Server"

View File

@@ -1,3 +1,9 @@
---
tags:
- PowerShell
- Scripting
---
**Purpose**:
This script *bumps* any replication that has entered a paused state due to a replication error. The script will record failed attempts at restarting the replication. The logs will rotate out every 5-days.

View File

@@ -1,3 +1,10 @@
---
tags:
- Minecraft
- PowerShell
- Scripting
---
**Purpose**: This script was purpose-built for the homelab Minecraft servers in my homelab. It may need to be ported based on your own needs.
```powershell

View File

@@ -1,3 +1,10 @@
---
tags:
- Nextcloud
- PowerShell
- Scripting
---
**Purpose**: In some unique cases, you want to be able to either perform backups of data or exfiltrate data to Nextcloud from a local device via the use of a script. Doing such a thing with Nextcloud as the destination is not very documented, but you can achieve that result by running a script like what is seen below:
## Windows

View File

@@ -1,3 +1,10 @@
---
tags:
- PowerShell
- Reporting
- Scripting
---
**Purpose**:
Sometimes you need a report of every user in a domain, and if/when their passwords will expire. This one-liner command will help automate that reporting.

View File

@@ -1,3 +1,10 @@
---
tags:
- PowerShell
- Reporting
- Scripting
---
``` powershell
$DaysInactive = 30
$time = (Get-Date).Adddays(-($DaysInactive))

View File

@@ -1,3 +1,10 @@
---
tags:
- PowerShell
- Reporting
- Scripting
---
``` powershell
InactiveDays = 30
$Days = (Get-Date).Adddays(-($InactiveDays))

View File

@@ -1,3 +1,11 @@
---
tags:
- SMB
- PowerShell
- Permissions
- Scripting
---
**Purpose**:
This script will iterate over all network shares hosted by the computer it is running on, and will give *recursive* permissions to all folders, subfolders, and files, including hidden ones. It is very I/O intensive given it iterates recursively on every file/folder being shared.

View File

@@ -1,3 +1,11 @@
---
tags:
- SMB
- PowerShell
- Permissions
- Scripting
---
**Purpose**:
This script will iterate over all network shares hosted by the computer it is running on, and will give *top-level* permissions to all the shared folders. It will not navigate deeper than the top-level in its report. Very I/O friendly.