Back to Home

PowerShell GUI for AD tech support

The article describes the development of PowerShell GUI for automating tech support tasks in AD domain. The tool extracts hostname, diagnoses PCs and performs remote operations. It was used for 3 years by a team of 15 specialists.

PowerShell GUI: tech support automation in AD
Advertisement 728x90

# Automating IT Support with PowerShell GUI: In-House Development Experience

In an Active Directory domain managing 4,000–5,000 Windows 7–10 workstations, support tickets arrived without IP addresses or hostnames. Accessing a user's PC information required manual searches in ADUC: copying the username from the ticket, navigating the console, and extracting the hostname from the account's Description field. This slowed down processing, especially when gathering hardware configurations or handling routine tasks without remote access.

The solution: a custom PowerShell script with a GUI interface. Enter a username, and the tool pulls the hostname from AD, collects account and PC details, and provides buttons for actions. Results appear in a single window: top panel for information, middle for functional buttons, bottom for output.

The script was developed from scratch based on analysis of the open-source LazyWinAdmin GUI (2011), tailored for a corporate environment. This ensured security, adaptation to specific tasks, and hands-on PowerShell experience at a mid-level developer standard.

Google AdInline article slot

Key Features of the Tool

The tool covered everyday IT support scenarios. It required admin rights on all domain PCs and network access (WinRM, SMB, ICMP).

Here's the core functionality:

  • Search and Data from AD: hostname by username, last logon time, password expiration, ping to hostname, full name, phone, employee ID, group memberships.
  • Remote Access: MSRA, Dameware, RDP—your choice.
  • Hardware Diagnostics: PC configuration (Get-WmiObject Win32_ComputerSystem, Win32_Processor, etc.), HDD S.M.A.R.T. status.
  • Administration: launch mmc 'Computer Management' with elevated rights, PS Remoting, cmd with admin rights, reboot/shutdown.
  • Maintenance: clean temp files (no GPO needed), calculate space for local/roaming profiles, copy software installers.
  • Software and Quotas: list of installed software (Get-WmiObject Win32_Product), Exchange mailbox size.
  • Special Features: reconfigure Windows Firewall rules, registry tweaks for peripherals, send messages to PC, ticket resolution reference.
  • Bulk Operations: AD exports (group members, employees by position), add to groups.

Implementation relied on ActiveDirectory, WMI/CIM, and WinRM modules. The GUI was built on Windows Forms (Add-Type -AssemblyName System.Windows.Forms), with a TextBox for username input, DataGridView for output, and Buttons for actions.

Google AdInline article slot

Development and Enhancements

Initially, the script handled hostname lookups. Features were gradually added as routine tasks emerged: from diagnostics to automating software installs. The guiding principle: one-click operations with logging in the GUI.

Example logic for hostname:

$username = $textboxLogin.Text
$user = Get-ADUser -Identity $username -Properties Description
$hostname = $user.Description

For hardware inventory:

Google AdInline article slot
Invoke-Command -ComputerName $hostname -ScriptBlock { Get-WmiObject Win32_Processor | Select Name, NumberOfCores }

The tool served a team of 15 specialists for 3 years, speeding up ticket resolution. Limitations: dependency on admin rights, no domestic software alternatives available at deployment.

Key Takeaways

  • The script reduced data lookup time from minutes to seconds, minimizing manual ADUC work.
  • Covers 80% of routine level-2 tasks without connecting to the PC.
  • Requires full domain admin rights; functionality is limited in restricted environments.
  • Based on PowerShell 5.1+ with AD modules and WinRM enabled.
  • Scalable via profiles (different button sets for roles).

— Editorial Team

Advertisement 728x90

Read Next