PowerShell: Automating Administrative Tasks
by Michael Shepard, Chendrayan Venkatesan, Sherif Talaat, Brenton J.W. Blawat
Summary
This chapter thoroughly explained the interaction of PowerShell with the files, folders, and registry objects. It began by displaying how to create a folder and a registry key by leveraging the new-item cmdlet. It also displayed the additional arguments that can be used with the new-item cmdlet to create a log file with the date time integrated in the filename. The chapter proceeded to display how to create and view a registry key property using the get-itemproperty and new-itemproperty cmdlets
This chapter then moved to verification of files, folder, and registry items through the test-path cmdlet. By using this cmdlet, you can test to see if the object exists prior to interacting with it. You also learned how to interact with copying ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access