This repository serves as my professional technical journal. Here, I document my daily progress and hands-on experience in Windows Systems Administration, PowerShell Automation, and Cybersecurity Hardening.
- The Goal: Establish a baseline of the system's hardware and network configuration using CLI.
- Scripts Created:
scripts/01_System_Discovery.ps1: Retrieves OS details, CPU model, RAM capacity, and Disk usage.scripts/02_Network_Discovery.ps1: Maps IPv4 addresses, DNS servers, and active TCP connections.
- Technical Skills: WMI/CIM querying, data formatting (Bytes to GB), and network stack auditing.
- The Goal: Automate user provisioning and audit local security privileges.
- Scripts Created:
scripts/03_Local_Admin_Audit.ps1: Identifies users with administrative rights to enforce the "Principle of Least Privilege".scripts/04_Password_Status.ps1: Audits account hygiene, checking password expiration and last set dates.scripts/05_Bulk_User_Provisioning.ps1: Automates the creation of multiple local accounts for new employees.
- Technical Skills: Local group management, security compliance auditing, and hybrid automation using PowerShell and Command Line.
- The Goal: Develop diagnostic tools for shop-floor stability and peripheral availability in MES environments.
- Scripts Created:
scripts/06_MES_Latency_Monitor.ps1: Performance auditor that measures network jitter and response times against production thresholds.scripts/07_Peripherals_Health_Check.ps1: Automated hardware discovery for barcode scanners and label printers to prevent line downtime.
- Technical Skills: Statistical analysis of network metrics, PnPDevice management, and proactive maintenance logic.
- The Goal: Ensure MES software uptime through automated log rotation and process monitoring.
- Scripts Created:
scripts/08_MES_Log_Maintenance.ps1: Automated cleanup utility that removes outdated log files (>7 days) to prevent disk space exhaustion.scripts/09_MES_Process_Watchdog.ps1: A reliability agent that detects frozen application states and automates process recovery.
- Technical Skills: Filesystem management, process lifecycle auditing, and automated fault recovery.
- The Goal: Create a unified diagnostic dashboard to provide immediate visibility into system health.
- Scripts Created:
scripts/10_MES_System_Health_Report.ps1: An integrative script that audits connectivity, storage availability, and process status in a single execution.
- Technical Skills: Data consolidation, CIM/WMI object querying for hardware metrics, and report formatting for technical management.
- Description: While running the first script, PowerShell returned a red error indicating a string was not properly closed.
- Root Cause: Invisible characters or "smart quotes" (curly quotes) were introduced during the process, or the file encoding was corrupted.
- Solution:
- Deleted the corrupted
.ps1file. - Re-created the file from scratch using UTF-8 encoding.
- Manually verified that all double quotes
"were straight and properly paired.
- Deleted the corrupted
- Description: While running the user provisioning script, PowerShell returned red errors indicating that specific parameters (like
-PasswordExpiresAtNextLogon) were not recognized or users were not found immediately after creation. - Root Cause: Environment mismatch: Certain PowerShell parameters are only available in Windows Enterprise builds or Active Directory environments, causing compatibility issues in local lab setups.
- OS Latency: The system sometimes fails to register a new user before the next command tries to modify its properties.
- Solution:
- Hybrid Approach: Integrated the classic
net usercommand for better compatibility across all Windows versions. - Execution Timing: Implemented
Start-Sleeppauses to ensure the OS completes account registration before applying further changes. - File Integrity: Deleted persistent errors by recreating the
.ps1files from scratch using UTF-8 encoding to clear hidden characters.
- Hybrid Approach: Integrated the classic
This project has been developed following industry standards and official documentation to ensure its applicability in mission-critical pharmaceutical environments.
- Microsoft Learn: PowerShell Documentation. Official reference for implementing system administration cmdlets such as
Get-Process,Test-Connection, andGet-CimInstance. - WMI/CIM Object Models. Technical reference for auditing hardware and industrial peripherals via Windows management interfaces.
- ISA-95 (Enterprise-Control System Integration). International standard for integrating MES (Level 3) with shop-floor infrastructure and network devices.
- GAMP 5 (Good Automated Manufacturing Practice). Fundamental principles for data integrity and validation of automated systems within the pharmaceutical industry.
- Statistical Performance Metrics. Methodologies for analyzing latency, jitter, and network availability in high-precision industrial environments.
- Proactive Resource Management. Logical framework for system maintenance, including automated log rotation and process monitoring using watchdog patterns.