Skip to content

Instantly share code, notes, and snippets.

@noahpeltier
Created January 12, 2019 19:50
Show Gist options
  • Save noahpeltier/b54891a2fe7a0577d361f7a48dbd5851 to your computer and use it in GitHub Desktop.
Save noahpeltier/b54891a2fe7a0577d361f7a48dbd5851 to your computer and use it in GitHub Desktop.
Class Computer {
[String]$Name
[String]$Description
[String]$Type
[String]$Owner
[int]$Reboots
Computer ([string]$Name,$description,$Type,$Owner){
$this.name = $Name
$this.Description = $Description
$this.Type = $Type
$this.Owner = $Owner
}
}
Class User {
[string]$fname
[string]$lname
[string]$title
[string]$email
[string]$phone
User ([string]$fname,$lname,$title,$email,$phone) {
$this.fname = $fname
$this.lname = $lname
$this.title = $title
$this.email = $email
$this.phone = $phone
write-host -object ("{0} has been created" -f $this.fname) -ForegroundColor Green
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment