Created
June 24, 2021 09:11
-
-
Save IT-Delinquent/4b0f2fbbbfeecc7b32b2145ad07e4cce to your computer and use it in GitHub Desktop.
personModelListInPowerShell
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
| #Creating a list to hold the people using the Person class | |
| $People = New-Object 'System.Collections.Generic.List[PSObject]' | |
| #Creating a new Person | |
| $newPerson = [PersonClass]::new() | |
| $newPerson.Name = "Roy Orbison" | |
| $newPerson.Age = "24" | |
| #Adding the new Person to the People list $People.Add($newPerson) | |
| $People.Add($newPerson) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment