SCRIPT
Rename-NoteProperty.ps1DESCRIPTION
A function to rename one or multiple NoteProperty of objects.
See examples in the test folder.
<# TEST #>
$IncPath = ".\functions\"
.$IncPath"Rename-NoteProperty.ps1"
# Example data
$myArray = @(
[PSCustomObject]@{ City = "Berlin" },
[PSCustomObject]@{ City = "Tokyo" },
[PSCustomObject]@{ City = "Delhi" }
)
Rename-NoteProperty -objects $myArray -oldName 'City' -newName 'Town'Town
----
Berlin
Tokyo
Delhi