The WindowsServerAssessmentTool_V1.0.ps1 script is a comprehensive PowerShell tool designed to perform detailed assessments on Windows Server systems. It features a modern, collapsible HTML interface with interactive navigation and provides a menu-driven selection system that allows users to selectively collect different types of system information. The tool generates professional HTML reports with corresponding CSV data exports for in-depth analysis.
- Modern Interactive HTML Reports: Collapsible left navigation menu with icons and smooth animations
- Menu-Driven Assessment Modes: Five targeted assessment options for focused data collection
- Professional UI/UX: Responsive design with color-coded sections and hover effects
- User-Friendly Data Presentation: PSCustomObject implementation with descriptive column names
- Responsive Tables: Auto-sizing tables with horizontal scrolling for wide data
- Dynamic Report Sections: Report content dynamically reflects user's menu selection
- Comprehensive CSV Exports: Detailed data files for external analysis and reporting
- Modular Architecture: Efficient function-based design for optimal performance
-
Sign scripts with your code-signing cert:
- Configure a certificate: either import a PFX to CurrentUser\My or provide
-PfxPathwhen running the tool. - From VS Code: run task "Sign: Sign scripts (Thumbprint)" and replace
[YOUR_CERT_THUMBPRINT]in.vscode/tasks.json. - Or run manually:
- pwsh -NoProfile -ExecutionPolicy Bypass -File .\tools\Sign-Code.ps1 -Thumbprint [THUMBPRINT] -Path . -Recurse -SkipValid
- Configure a certificate: either import a PFX to CurrentUser\My or provide
-
Verify signatures:
- From VS Code: run task "Sign: Verify scripts".
- Or run manually:
- pwsh -NoProfile -ExecutionPolicy Bypass -File .\tools\Sign-Code.ps1 -VerifyOnly -Path . -Recurse
-
Build an .exe with PS2EXE (optional):
- From VS Code: run task "Build: UI EXE (PS2EXE)" to produce
dist/WSAT-UI.exe. - Or run manually:
- pwsh -NoProfile -ExecutionPolicy Bypass -File .\tools\Build-Exe.ps1 -InputPath .\WindowsServerAssessmentTool_UI.ps1 -Output .\dist\WSAT-UI.exe -NoConsole -Sta
- From VS Code: run task "Build: UI EXE (PS2EXE)" to produce
Notes:
- Requires Windows PowerShell 5.1+.
- PS2EXE is installed from PSGallery if missing.
- Signing uses SHA256 and timestamps via DigiCert by default.
- User-Friendly Column Names: All major sections now use PSCustomObject with descriptive column headers instead of technical property names
- Responsive Table Design: Wide tables automatically scroll horizontally and resize appropriately
- Dynamic Report Content: "Key Areas Assessed" and "Assessment Categories" sections now dynamically reflect the user's menu selection
- Improved Table Headers: Header text uses proper capitalization (first letter of each word) instead of all uppercase
- Search Functionality Removed: Removed search input from "Running Windows Services" section for cleaner interface
- Enhanced Error Handling: Improved error handling throughout all collection functions
- Optimized Data Processing: Better memory management and performance optimization
- Consistent Output Format: Standardized HTML table formatting across all sections
- File Name: WindowsServerAssessmentTool_V1.0.ps1
- Author: Abdullah Zmaili
- Version: 1.0
- Date Created: June 16, 2025
- Prerequisites: PowerShell 5.1 or later, Administrator privileges for comprehensive assessments
The generated HTML reports include:
-
Modern Collapsible Navigation
- Left-aligned navigation menu with icon indicators
- Expandable/collapsible sections for organized content
- Smooth animations and professional styling
- Section counters showing number of assessment areas
-
Professional User Interface
- Responsive design optimized for desktop and tablet viewing
- Color-coded sections with gradient backgrounds
- Hover effects and smooth transitions
- Executive summary dashboard with key metrics
-
Interactive Content Organization
- Clickable navigation for instant section access
- Subsection organization for detailed information
- Responsive table containers for wide data sets
- Auto-sizing tables with horizontal scrolling capability
- Print-optimized styling
-
Enhanced Data Presentation
- User-friendly column names throughout all sections
- PSCustomObject implementation for better readability
- Proper table header capitalization
- Clean, professional table styling
- Dynamic report sections based on user selection
The script offers five distinct assessment modes:
-
SYSTEM INFORMATION ONLY
- OS Details, CPU, Memory, Disk Information
- Windows Features, Services, Programs
- Updates and Processes
- Generated Sections: 13 comprehensive system assessment areas
-
NETWORK ASSESSMENT ONLY
- Network Interface Configuration
- Traffic Statistics and Performance
- Open Ports and Connections
- Generated Sections: 3 focused network assessment areas
-
SECURITY ASSESSMENT ONLY
- Antivirus and Firewall Settings
- User Accounts and Password Policies
- Security Configurations and Certificates
- Generated Sections: 17 comprehensive security assessment areas
-
SCHEDULED TASKS & STARTUP & LOGS ONLY
- Startup Programs and Services
- Scheduled Tasks Configuration
- System, Application & Security Event Logs
- Generated Sections: 3 focused task and log assessment areas
-
ALL SECTIONS (Complete Server Assessment)
- Comprehensive collection of all above sections
- Generated Sections: 36 total assessment areas covering all aspects
- Main Report:
[ServerName]-SystemReport.html- Comprehensive HTML assessment report based on selected mode - GPO Settings:
[ServerName]-GPOSettings.html- Group Policy Objects details (when applicable)
The script generates targeted CSV files based on the selected assessment mode:
System Information Assessment Mode:
[ServerName]-OSInfo.csv[ServerName]-CPUInfo.csv[ServerName]-CPUUsage.csv[ServerName]-RAMInfo.csv[ServerName]-DiskInfo.csv[ServerName]-UpTime.csv[ServerName]-WinFeatures.csv[ServerName]-RunningServices.csv[ServerName]-StoppedServices.csv[ServerName]-InstalledProgs.csv[ServerName]-allProcesses.csv[ServerName]-UpdatesInstalledInfo.csv[ServerName]-MissingUpdates.csv
Network Assessment Mode:
[ServerName]-NICInfo.csv[ServerName]-TrafficInfo.csv[ServerName]-OpenPorts.csv
Security Assessment Mode:
[ServerName]-AVSettings.csv[ServerName]-FirewallStatus.csv[ServerName]-FirewallSettings.csv[ServerName]-SMBv1.csv[ServerName]-InactiveAccountsInfo.csv[ServerName]-LocalAdmins.csv[ServerName]-PasswordPolicyInfo.csv[ServerName]-SMBShares.csv[ServerName]-auditSettings.csv[ServerName]-TLSregSettings.csv[ServerName]-UACSettings.csv[ServerName]-PSExecPolicy.csv[ServerName]-RDPSecurity.csv[ServerName]-Certificates.csv[ServerName]-DNSSettings.csv[ServerName]-DefenderASR.csv[ServerName]-DefenderExploit.csv
Tasks & Logs Assessment Mode:
[ServerName]-StartupProgs.csv[ServerName]-ScheduledTasks.csv[ServerName]-EventViewerLogs.csv[ServerName]-Systemlogs.csv[ServerName]-Applicationlogs.csv[ServerName]-Securitylogs.csv
-
PowerShell Version: Ensure PowerShell 5.1 or later is installed
-
Administrator Rights: Run PowerShell as Administrator for comprehensive data collection
-
Execution Policy: Set execution policy to allow script execution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Launch PowerShell as Administrator
- Right-click on PowerShell and select "Run as Administrator"
-
Navigate to Script Location
cd "C:\temp\WindowsServerAssessmentTool" -
Execute the Script
.\WindowsServerAssessmentTool_V1.0.ps1 -
Specify Output Directory
- When prompted, enter the full path where you want to save the assessment reports (e.g.,
C:\temp) - The script will create the directory if it doesn't exist
- When prompted, enter the full path where you want to save the assessment reports (e.g.,
-
Select Assessment Mode
- Choose from the 5 available options:
- Enter
1for System Information Assessment Only - Enter
2for Network Assessment Only
- Enter
- Enter
3for Security Assessment Only- Enter
4for Tasks & Logs Assessment Only - Enter
5for Complete Server Assessment
- Enter
- Choose from the 5 available options:
-
Wait for Completion
- The script will display progress messages as it collects information
- Assessment time varies based on selected mode and system complexity
The HTML assessment report includes:
- Executive Summary Dashboard: Key metrics overview with visual indicators
- Interactive Navigation Menu: Collapsible left sidebar with icons and section counters
- Dynamic Content Sections: Report content automatically reflects selected assessment mode
- Modern Styling: Professional gradient backgrounds, hover effects, and responsive design
- Section-Based Organization: Content organized by assessment areas with expandable subsections
- Enhanced Data Tables: User-friendly column names and responsive table design
- Header Information: Server name, generation timestamp, logged user, assessment scope
- Print-Friendly Layout: Optimized for both screen viewing and printing
- User-Friendly Column Names: All tables use descriptive headers instead of technical property names
- Responsive Tables: Wide tables automatically include horizontal scrolling and proper sizing
- Dynamic Sections: "Key Areas Assessed" and "Assessment Categories" reflect your menu selection
- Professional Formatting: Proper capitalization and clean styling throughout
- Each CSV file contains raw data for specific system components
- Files can be imported into Excel or other tools for further analysis
- Only relevant CSV files are generated based on the selected assessment mode
The script generates HTML reports with:
- Collapsible Navigation Menu: Modern left-aligned sidebar with smooth animations
- Interactive Elements: Clickable sections with hover effects and transitions
- Professional Styling: Gradient backgrounds, icon integration, and responsive design
- JavaScript Functionality: Dynamic content switching and navigation management
- CSS3 Features: Modern styling with animations, gradients, and responsive layouts
- Enhanced Data Tables: Responsive table containers with horizontal scrolling for wide data
- User-Friendly Headers: Descriptive column names using PSCustomObject implementation
- Dynamic Content: Report sections automatically adjust based on user's menu selection
The script is built with a modular architecture featuring:
- Separate Functions: Individual functions for each assessment area
- Conditional Logic: Smart data collection based on user selection
- Error Handling: Graceful handling of assessment failures
- Progress Reporting: Real-time feedback during execution
- Get-SystemInformation: Collects comprehensive system details
- Get-NetworkInformation: Gathers network configuration and statistics
- Get-SecurityInformation: Retrieves security settings and configurations
- Get-TasksStartupLogsInformation: Collects startup programs, tasks, and logs
The script now provides significantly improved data presentation:
All major sections now use PSCustomObject with user-friendly column names:
- Antivirus Settings: "AV Enabled", "Real Time Protection", "Behavior Monitor" (instead of technical property names)
- SMB Shares: "Share Name", "Share Path", "Share Type", "Folder Enumeration Mode"
- Updates Installed: "Update Title", "Installation Date", "Update Size (MB)", "Description"
- DNS Client Settings: "DNS Servers", "DNS Over HTTPS", "DNS Cache", "Secure Name Resolution"
- PowerShell Execution Policy: "Scope", "Execution Policy", "Security Risk Assessment"
- Running Processes: "Process Name", "Process ID", "Memory Usage (MB)", "CPU Time", "Window Title"
- Windows Features: "Feature Name", "Display Name", "Current State", "Restart Required"
- TCP Ports Opened: "Local Address", "Local Port", "Remote Address", "Remote Port", "Connection State", "Process Name"
- Event Viewer Logs: "Log Name", "Maximum Log Size (KB)", "Overflow Action", "Minimum Retention (Days)"
- Wide Tables: Automatically wrapped in responsive containers with horizontal scrolling
- Professional Styling: Modern table headers with proper capitalization
- Auto-sizing: Tables adjust to content width while maintaining readability
- Mobile-Friendly: Responsive design works across different screen sizes
- Assessment Categories: Dynamically shows "System Information", "Network Configuration", "Security Assessment", etc. based on menu selection
- Key Areas Assessed: Content automatically reflects the chosen assessment mode
- Section Counts: Navigation menu shows accurate section counts for selected mode
- Selective Assessment: Only gathers data for selected sections
- Optimized Queries: Efficient WMI and PowerShell cmdlet usage
- Memory Management: Proper variable cleanup and resource management
- Background Process Handling: Smart handling of long-running operations
-
Navigation Menu Not Responding
- Solution: Ensure JavaScript is enabled in your browser
- Alternative: Use a modern browser (Chrome, Firefox, Edge)
-
Sections Not Expanding/Collapsing
- Cause: JavaScript execution blocked or browser compatibility
- Solution: Check browser console for errors, use updated browser
-
Layout Corruption in Specific Sections
- Symptoms: Content overlapping or misaligned
- Solution: Refresh the page, ensure browser zoom is at 100%
-
Tables Not Displaying Properly
- Symptoms: Wide tables overflowing or headers misaligned
- Solution: Ensure browser supports CSS flexbox and CSS3 features
- Alternative: Use horizontal scroll within table containers
-
Dynamic Content Not Updating
- Cause: Report sections not reflecting selected assessment mode
- Solution: Re-run the script if content doesn't match your selection
- Check: Verify the correct menu option was selected during execution
-
Print Layout Issues
- Cause: Print-specific CSS not loading properly
- Solution: Use browser's print preview and adjust print settings
- Use specific assessment modes for faster execution
- Ensure sufficient disk space in the output directory
- Close unnecessary applications to free up system resources
- Run during off-peak hours for comprehensive assessments
-
Permission Denied Errors
- Solution: Run PowerShell as Administrator
- Alternative: Check file/folder permissions on output directory
-
Execution Policy Restrictions
- Error: "cannot be loaded because running scripts is disabled"
- Solution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
WMI Access Issues
- Symptoms: Missing system information or errors during assessment
- Solution: Ensure WMI service is running:
Get-Service Winmgmt
-
Network Information Missing
- Cause: Insufficient privileges or network adapter issues
- Solution: Verify network adapters are properly configured and accessible
-
Long Execution Times
- Expected Behavior: Complete server assessments can take several minutes
- Optimization: Use specific assessment modes (1-4) instead of "ALL SECTIONS" for faster execution
The script collects various types of sensitive information:
- System Configuration: Hardware and software details
- Security Settings: Firewall rules, antivirus status, user accounts
- Network Information: IP configurations, open ports, traffic statistics
- Event Logs: System events, security events, application logs
- Secure Storage: Store assessment output files in secure locations
- Access Control: Limit access to generated assessment reports
- Data Retention: Implement appropriate data retention policies
- Regular Cleanup: Remove old assessment reports that are no longer needed
- Network Security: Be cautious when transmitting reports over networks
To customize what information is assessed:
- Edit the respective
Get-*Informationfunctions - Add or remove specific data collection commands
- Modify the CSV export sections as needed
- HTML Styling: Modify the CSS section in the HTML generation area
- CSV Structure: Adjust the
Select-Objectstatements in collection functions - Additional Formats: Add JSON or XML export options if needed
- Create new collection logic within existing functions
- Add corresponding CSV export paths
- Update HTML generation sections
- Test thoroughly with different system configurations
- Monthly Review: Check for new Windows updates that might affect assessment
- Quarterly Updates: Review and update collection queries for new system features
- Annual Overhaul: Consider adding new sections based on evolving security requirements
- V1.0 (June 2025): Initial release with menu-driven selective assessment, enhanced user interface, and improved data presentation
- Enhanced Data Presentation: Implemented PSCustomObject throughout all major sections for user-friendly column names
- Responsive Table Design: Added table containers with horizontal scrolling for wide data sets
- Dynamic Report Content: Assessment Categories and Key Areas Assessed sections now reflect user's menu selection
- Improved Table Formatting: Headers use proper capitalization instead of all uppercase
- UI/UX Improvements: Removed search functionality from Windows Services section for cleaner interface
- Better Error Handling: Enhanced error handling and performance optimization throughout
Potential improvements for future versions:
- Remote Assessment: Support for remote server assessments
- Scheduled Execution: Built-in task scheduler integration
- Email Reports: Automatic email delivery of assessment reports
- Comparative Analysis: Historical trending and comparison features
- Custom Thresholds: Configurable alert thresholds for various metrics
- Export Options: Additional export formats (JSON, XML)
- Custom Branding: Configurable report headers and styling
- Advanced Filtering: Interactive filtering options within HTML reports
For questions, issues, or enhancement requests:
- Author: Abdullah Zmaili
- Created: June 16, 2025
- Version: WindowsServerAssessmentTool_V1.0
This documentation covers the comprehensive Windows Server Assessment Tool designed for system administrators and IT professionals.