Using a few PowerShell cmdlets and even some built-in tricks, we can read from and write to files. This is especially useful if you write a script that gets run multiple times and you need to save data or script options to retrieve at a later date. You may also want to save data collected from a script into a CSV file, which could later be imported into Excel to produce a report. For us, we can use basic text files to store level, character, and other object graphics and settings. We can even store character scripts, which control ...
17. Working with Files
Get PowerShell for Beginners: Learn PowerShell 7 Through Hands-On Mini Games now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.