I can use a hash table, saved to disk, for … whatever reason. My next logical thought was, can we use calculated properties? Can I use a different descriptor than Key and Value? You bet we can - take a look.Įxport-Csv -NoTypeInformation -Path. Sure, it holds the same values as Name, but in a host program, we’re actually accustomed to seeing Name and Value, not Key and Value.Įxport-Csv -NoTypeInformation -Path. Update: It dawned on me, after I made all these screen captures, that I wasn’t expecting to see the above Name property included. ![]() With this in mind, let’s instead pipe to the Select-Object cmdlet before Export-Csv and get things properly filtered. Huh? I only expected the Keys and Values, like we’d see produced onscreen. Now it’s just perfect, minus the whole Name property (column). This allows us to walk through each key-pair in our hash table.Įxport-Csv -NoTypeInformation -Path. In order to get this to work properly, we need to use the GetEnumerator method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |