Your organization’s IT support team would like to use PowerShell more for daily tasks. They would like a module with a set of commands to make their work easier. The module should support PowerShell 7.2. Windows-based servers have ssh installed, and management would like to transition from WSMan to ssh.
The module should have commands that can achieve the following tasks:
- Manage a local user account. This includes creating the account, setting the password, and local group membership.
- Get when a server last shut down, booted up, how long it was down, and its uptime. If you can include who last shutdown or rebooted the server, so much the better.
- A command to show remote connected users using PowerShell remoting. Include both traditional connections and ssh.The output should show the user name, when they connected, how long connected, and if possible their source IP address.
- A command to show disk usage, especially one that can use ANSI to highlight availability or lack thereof.
- A unified command to return version information for installed versions of PowerShell, the operating system, and the ssh version.
- A PowerShell-based version of the Linux *top* command that can be run remotely on a Windows server.
You can assume all Windows servers are running at least Windows Server 2016.
In addition to PowerShell functions that accomplish the given tasks, your finished project should meet the following requirements:
- Have a module manifest.
- Run in PowerShell 7.2.
- Commands with remoting should support alternate credentials.
- Include help documentation or at least the foundation.
- A suite of Pester tests for unit testing your solution.
Knowing how to write an effective Pester test is becoming a must-have PowerShell skill. Your submission should have as many Pester tests as possible to validate your code. Depending on your faction, you may want to write your Pester tests first as part of a TDD effort.
The judges are very interested in how you take advantage of PowerShell 7.2 features.
Commands should write rich objects to the pipeline. Including format and type extension files will give you an edge over the competition.
The remaining grade will be based on how well your overall code structure meets your faction’s philosophy.