class NetConfig { #Properties [STRING]$ComputerName = "srv01"; [STRING]$IpAddress = "192.168.178.2"; [STRING]$DNS = "192.168.178.1"; #Methods [Void] SetComputerName([STRING]$Name) { $this.ComputerName = $name; } } $MyObj = [NetConfig]::new(); $myObj.ComputerName; $MyObj.SetComputerName("srv02"); $myObj.ComputerName;