I’ve enclosed two registry ‘splats’ inside an array. I really like the way it looks.
Although it works fine, is it best practice ?
# New build tattoo Registry Settings in Array $nestedRegKeys = @( # Registry Value 1 Splatted @{ Path = $path name = "Task Sequence" Value = '$TSeq' } # Registry Value 2 Splatted @{ Path = $path name = "Build Completed" Value = $(Get-Date -Format s) } ) # Run in new keys $nestedRegKeys | foreach { New-ItemProperty @_ -Force }