Last active
September 4, 2016 08:56
-
-
Save Stephanevg/fe288e1fbcd930713080382d08dbf020 to your computer and use it in GitHub Desktop.
Regroups all the necessary elements for the creation of server and client devices in active directory.
This file contains hidden or 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
{ | |
"Owner":"", | |
"Type":"", | |
"Description":"Web Server", | |
"ServiceOwner":"Marketing" | |
} | |
Class ComputerConfiguration { | |
[string]$Owner | |
[string]$Type | |
[string]$Description | |
[string]$ServiceOwner | |
ComputerConfiguration ([string]$ConfigFilePath){ | |
$json = gc -Path $ConfigFilePath | convertfrom-json | |
if (!($json.owner)){ | |
write-error "Could not create object without specifying parameter Owner." | |
} | |
$this.owner = $json.owner | |
$this.Type = $json.type | |
$this.ServiceOwner = $json.serviceowner | |
$this.Description = $json.description | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment