# Get ACL Permissions for a specific OU (Get-ACL "AD:$((Get-ADOrganizationalUnit -Identity 'OU=Computers,DC=Test,DC=LOCAL').distinguishedname)").access | Select IdentityReference,AccessControlType,ActiveDirectoryRights.IsInherited #Other examples available from https://www.easy365manager.com/how-to-document-ou-delegation/ https://shellgeek.com/get-ad-ou-permissions-report/
Query Active Directory – Security Script
PowerShell script to query active directory : Identify Accounts with Password expiring is disabled Identify Accounts have not logged on for 30 or 90 days and accounts have never logged…
Azure – Create Kubernetes Cluster with ACR Integration
How to create a Kubernetes Cluster with ACR Integration and Service Principal Authentication. Create Kubernetes Cluster, Select the Kubernetes Services Blade> Cloud Shell You will be prompted for storage if…
EXO V2 Module – Microsoft 365 Exchange Online – PowerShell Module
EXO v2 Exchange Online PowerShell Module download here Some PowerShell commands to help you manage your Microsof 365 Exchange. More information on the Microsoft Site here How to load the…
Ping sweep script test
POWERSHELL import-CSV "" | foreach { $result = Test-Connection -ComputerName $_.Name -Count 1 -Quiet $_.name, $result -join ',' | out-file "c:\scripts\PingSweep\computer_results.txt" -Append } COMMAND /BATCH SCRIPT Create list of computers…
If Not Exists – Batch Script
Create a batch file to check a text file is in the location specified, else run a task. #This batch file checks to see if a text file is…
Remove Directory Batch Script
#Remove directory in a batch file # rmdir /S /Q "C:\test\"
Robocopy Mirror Files and Folders
Map network drives to the correct locations Run CMD as Administrator Mirror file & directories and output detail to text file robocopy E:\..... z:\.... /MIR /S >c:\temp\detail.txt
Robocopy. Copy Move Files Older or Newer than X number of days
Script options Move only files under 60days old Move files older than 60days Move files back Move files older than 182 is number of days (6 months roughly) Move only…
For Loop command to list users with sessions on servers
Problem : Users/Admins disconnect from sessions on servers. How to get a list of users logged on to server active and disconnected Simple Solution! Create a file call servers.txt -…