<#
author: Fer Carraro
date: 22/03/2020
#>
class Persona{
[string]$Nombre
[int]$Edad
[boolean]$Activo
}
$persona = [Persona]::new()
$persona.Nombre = "Juliana"
$persona.Edad = 2020-1981
$persona.Activo = 12 -eq 0
if($persona -ne $null){
write-host "El objeto esta lleno!!"
$persona
#Para mas detalles
#$persona | gm
}
Creando una clase con powershell
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.