Created
June 11, 2019 06:06
-
-
Save chriskuech/131837e70cfb1e29e43e473f0219a94c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Computer { | |
[string] $Service | |
[string] $ClusterId | |
[string] $DatacenterId | |
[string] $Id | |
Computer([string]$Id) { | |
$this.Id = $Id | |
if ($Id -notmatch "(\w+)(\d+)(\w+\d+)") { | |
throw "Invalid Computer ID '$Id'" | |
} | |
$_, $this.Namespace, $this.ClusterId, $this.DatacenterId = $Matches | |
} | |
} | |
class AuditResult { | |
[boolean] $Healthy | |
[Computer] $Computer | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment