-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2017/06/Remove_PSObject_Property #280
Comments
Tell me, please, If I have a object inside another object, both with a arraylist structure, how do I remove one property? Here is my exemple: $register = [System.Collections.ArrayList]::new() $register.Add( [PSCustomObject]@{ item = New-Object System.Collections.ArrayList } ) > $null $register[0].item.Add([pscustomobject]@{attribute = "1st";type = "1st-Type";value = "1st-Value"}) > $null $i = 0 $do_loop = $true $register[$i].item[$j].attribute $register[$i].item[($register[$i].item.count -1)].attribute While loopWhile ($j -ne $register[$i].item.count)
} Write-Host "" $register[$i].item.Remove($register[$i].item[6]) Write-Host "" Write-Host "" |
Remove a PowerShell Object property - LazyWinAdmin
In this article we’ll see how to remove a property from a Powershell Object
https://lazywinadmin.github.io/2017/06/Remove_PSObject_Property.html
The text was updated successfully, but these errors were encountered: