PowerShell Classes
PowerShell 5.0+ supports real classes — type safety, encapsulation, and cleaner code.
Basic Class
class Server {
[string]$Name
[string]$IPAddress
Server([string]$name, [string]$ip) {
$this.Name = $name
$this.IPAddress = $ip
}
}