recently i having trouble workong with csv ,it is hard to maintain ,using add-content is not elegant and hard to maintain ,.when i working to study it, i found a easy way to solve this problem
instead of the regular csv file i write a new format of hashtable
first we have a default csv file
The new format will be
member is the value default csv file’s member,and the value will be the hashtable of the default csv file object.i call this hashtable the ‘attribute-object’. i store the member into the hashtable so could use the add ,remove ,and ’=‘ which could easily manage in the powershell https://github.com/CNcodegod/attribute-object/blob/main/README.md#how-to-use
hello.i am a big fan of the powershell and learn since 2022. so i do understand the import-csv and export-csv but i consider the powershell dosen’t have the easy way to +,-,= the csv in powershell directly so i turn the object in the csv into hashtable ,so i could easily manage them with
I don’t know what that means. Do you have an example?
Please do not post images of code or console ouptut. Instead post the plain text and format it as code.
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.