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
-
PSrepairIntuneManagementextention.ps1
- 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
-
- Detects if the latest monthly Office updates are installed
- Uses PSWindowsUpdate module for compliance detection
-
- Installs all missing Office updates via Windows Update
- Uses PSWindowsUpdate module and reboots if required
-
- Compares group memberships between users
- Shows differences in group memberships
- Supports AD and Azure AD comparison
-
- Compares multiple users in Microsoft Entra ID (Azure AD)
- Displays selected properties and group membership differences
- Intune-SyncDevice Scripts
- Detection.ps1: Checks last Intune sync time
- Remediation.ps1: Forces Intune sync if needed
- Dell Command Update Scripts
- 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 -Full
Example 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"
# Detect missing Office updates
.\Remediations\detectOfficeUpdates.ps1
# Remediate missing Office updates
.\Remediations\remediatOfficeUpdates.ps1
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