A comprehensive collection of PowerShell scripts for system administration, focusing on Azure AD, Windows Updates, and system maintenance tasks.
Clone this repository and run the scripts with appropriate permissions. Most scripts require administrative privileges and specific PowerShell modules.
# Clone the repository
git clone https://github.com/roalhelm/PowershellScripts.git
# Navigate to the script directory
cd PowershellScripts
# Run GUI tool for device management
.\AddAADDeviceToAADGroup\DevicetoAADGroupGUI.ps1- PowerShell 5.1 or higher
- Administrative privileges
- Required PowerShell modules:
- AzureAD
- PSWindowsUpdate
- ActiveDirectory
- Microsoft.Graph (for some Azure AD operations)
- DevicetoAADGroupGUI.ps1
- Modern Windows Forms interface
- Live device list preview
- Multiple input format support
- Integrated AAD group management
- Real-time validation
- Add-DevicesToAADGroupFunction.ps1
- Reusable AAD group management function
- Detailed operation logging
- Error handling and reporting
- Status object return
- CSV file support
- Verifies device existence in Azure AD
- Processes devices from CSV input file
- Creates separate CSV files for found/not found devices
- Outputs detailed summary statistics
- Adds devices to specified Azure AD groups
- Supports bulk operations via CSV input
- Checks for existing group memberships
- Provides detailed logging of operations
- GUI tool for creating device lists
- Manages CSV files for AAD operations
- Supports comma, semicolon, or space-separated input
- Includes cleanup functionality
- Advanced WMI repository repair tool
- Supports local and remote computer repair
- Manages WMI repository folders
- Verifies and repairs WMI consistency
- Repairs/reinstalls Intune Management Extension
- Stops required services
- Removes existing installation
- Triggers new installation
- Updates system drivers via Windows Update
- Manages BitLocker status during updates
- Creates detailed operation logs
- Supports both local and remote execution
- Resets Windows Update components
- Cleans update cache
- Removes problematic group policies
- Triggers update scan cycles
- Compares group memberships between users
- Shows differences in group memberships
- Supports AD and Azure AD comparison
- Detection.ps1: Checks last Intune sync time
- Remediation.ps1: Forces Intune sync if needed
- detectDellCommandUpdate.ps1: Checks DCU installation
- remediatDellCommandUpdate.ps1: Removes DCU if found
Most scripts include detailed help information. Use PowerShell's Get-Help for details:
Get-Help .\ScriptName.ps1 -FullExample for AADChecker:
.\AddAADDeviceToAADGroup\AADChecker.ps1# Add devices to AAD group using GUI
.\DevicetoAADGroupGUI.ps1
# Add devices using function
$result = Add-DevicesToAADGroup -GroupName "TestGroup" -CsvPath ".\Devices.csv"
# Check AAD device status
.\AADChecker.ps1 -InputFile "devices.csv"Scripts create logs in appropriate locations:
- Windows Event Log for system operations
- Custom log files in %ProgramData% for specific operations
- Text file logs in script directories
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the GNU General Public License v3 - see the LICENSE file for details.