Category Archives: PowerShell GUI Tools

Create a PowerShell GUI application to perform remote desktop operation using Microsoft Remote Desktop ActiveX control

PowerShell RDC
PowerShell Remote Desktop Client

In order to get the Remote Desktop Client to function in a .NET project you must obtain the Remote Desktop ActiveX control wrapper (MSTSCLib.dll and AxMSTSCLib.dll).
MSTSCLib

You may need to unblock the files, since they were downloaded from internet.
File –> Right click –> Properties

Unblock File
Unblock File Downloaded from Internet

Create PowerShell Winform and add Panel control. Additionally add buttons for connect, disconnect, refresh, etc.

Load into your PowerShell script both ActiveX component assemblies:

where $dllpath is the location of the files.
Create new Object type and add it to the form Panel control:

Create new on-click event for button “Connect” and fill in the RDP client properties:

Click here for the Microsoft Remote Desktop ActiveX control client settings reference.

Get Windows Product License Information (including license type and product key) PowerShell/WinForms GUI Tool

Windows License Extractor is a small PowerShell/WinForms GUI tool that will help you to display/export licensing information (including the product key where possible) for your current running operating system, as well as other remote computer systems.

Windows License Extractor
Windows License Extractor 1.0.0

This utility can be useful if you lost the product key of your Windows, and you want to reinstall it on your computer.

Download:
Get-ProductKey

Windows 10 Store Apps Uninstaller (PowerShell/WinForms)

If you no longer need an app, then you could use Windows 10 Store Apps Uninstaller to remove it and free up space on the drive.

 

Windows 10 Store Apps Uninstaller
Windows 10 Store Apps Uninstaller
  • Easy way to remove apps via right click -> Uninstall for a single app or in bulk.
  • Lets you remove some of the built-in apps that the Windows 10 menu won’t let you remove.

Note: Windows 10 Store Apps Uninstaller will remove the Windows app for only the user account that is currently logged on.

Download:
Store Apps Uninstaller

PowerShell Robocopy GUI Update (PowerCopy 1.0.1)

Few necessary improvements have been made to Robocopy GUI tool.  Part of the code was completely rewritten to optimize the Robocopy performance.

PowerCopy - PowerShell Robocopy GUI Tool
PowerCopy v1.0.1 – PowerShell Robocopy GUI Tool

New functions added to the PowerShell/Robocopy GUI tool:
-progress bar
-terminate Robocopy process
-save preferences

The progress bar will indicate how much of the data has been Robocopied.
The progress tracking is based on the source file count and it is not fully accurate in some cases, for instance, when the same files are presented at the destination.

What is interesting here is the Save Options function which will store your preferable configuration (together with Advanced Options and Logfile Path) in the script itself.
It is using the automatic variable $MyInvocation to discover the location of the ps1 file and Get-Content/Set-Content cmdlets to write the changes directly into the script.

Download:
PowerCopy 1.0.1

Ways to use the advanced options.

Robocopy Advanced options:

Copy file attributes / exclude files.
Copy file attributes / exclude *.tmp files.

 

 

Robocopy exact file:

Robocopy single file
Robocopy single file

 

Robocopy files selected by criteria:

Robocopy only log files
Robocopy only log files

 

Custom Logon Screen GUI Tool for Windows 7

Custom Logon Screen GUI
Custom Logon Screen GUI tool

Custom Logon Screen GUI tool will help you change the default Windows 7 logon screen background.
All you need to do is to select the desired image, and click Change Logon Screen button to apply it.
Few things you should be aware of:
-Don’t forget to run the tool as administrator.
-The selected image file size should NOT exceed 256KB.
-A single registry edit will be performed in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background changing OEMBackground value to 1.

Download:
Windows 7 Logon Screen Changer – GUI PowerShell Tool

The Code:

 

PowerShell-Robocopy GUI Tool

Robocopy GUI tool leverages the command-line utility Robocopy (Robust File Copy – introduced with Windows Server 2003 Resource Kit).
Robocopy best features include the option to copy file attributes along with the NTFS permissions, mirror the content of an entire folder hierarchy across local volumes or over a network excluding certain file types, copying files above or below a certain age or size, monitor the source location for changes, and giving detailed report with an option to output the status to a log file.
In addition, PowerShell GUI tool is making the process easy to configure and control providing ability to set up predefined options, one-click access to help and log file, and instant error analysis.

Robocopy PowerShell GUT tool
Robocopy-PowerShell GUI tool v1.0.0

Features:
-supports spaces in the file name
-supports long paths
-shows Robocopy help
-recommended options
-ability to enter advanced options
-enable/disable file logging
-generates log file name (current date + source folder name)
-opens the current job logfile in notepad
-parses the current log file and shows ERROR messages

Screenshots:

Start Robocopy

Start Robocopy
Start Robocopy

Robocopy Help

Robocopy Help
Robocopy Help

Show Errors

show_errors_button

Advanced Options

Advanced Options
Advanced Options

Enable Logging

Enable Logging
Enable Logging

Download:
PowerShell Robocopy GUI Update (PowerCopy 1.0.1)

The Code
To set up your preferable Robocopy options jump to check boxes section (line 173 – 457) and find the option you want to modify. Change the $checkbox.Checked value from $False to $True

To uncheck the recommended options lines:
430 – 457

If you want to change the log file name modify lines:
97,118 and 126

Code snippet:

Create a Link Label using WinForms

The following code is an example how to create a link label using WinForms in PowerShell:

And here is a demo form showing 3 link labels:

PowerShell GUI - Link Label
PowerShell GUI – Link Labels

Code: