© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
I. WatersPowerShell for Beginnershttps://doi.org/10.1007/978-1-4842-7064-6_17

17. Working with Files

Ian Waters1  
(1)
Bexhill, UK
 

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 ...

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.