Skip to content

devops-collective-inc/Iron-Scripter-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iron Scripter 2022

iron scripter

The Iron Scripter event returned to the PowerShell + DevOps Global Summit. Even though conference attendance was down from previous events, which wasn't unexpected, enthusiasm was high. The three scripting factions battled it out to see whose code would reign supreme. Their efforts were judged by Anthony Nocentino, Sean Wheeler, and Jason Helmick.

The factions were given 60 minutes to develop a PowerShell solution to meet this challenge.

Background

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.

Requirements

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.

Grading Criteria

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 test-drive development (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.

Results

Each faction posted their code to a Github repository. You can find an archive of their work in this repository. The judges reviewed the code, documentation, and Pester tests. Unlike past events, factions were able to submit working code which was executed. The judges were very taken with the submission from Flawless, but it wasn't quite flawless enough. A bug prevented the module from being loaded. In the end, Daybreak prevailed with a combination of working code that met many of the challenge requirements.

Daybreak 2022

You are encouraged to review each faction's work to see how they tackled the challenges. You are also welcome to try your hand. Take one of the requirements and see how far you can get. You do not have to put yourself under a time constraint. Even if you don't complete the assignment, the development process itself will be educational.

Be Challenged

You can challenge yourself and improve your PowerShell scripting skills by visiting https://ironscripter.us. You will find an array of scripting challenges for all skill levels. You are welcome and encouraged to try your hand at as many of them as possible. You should attempt challenges that you feel are above your skill level. The best way to learn PowerShell is by doing.

All code in this repository is offered as-is and should be considered educational material. Nothing should be considered as production ready.

About

An archive of the Iron Scripter 2022 event.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published