PowerShell Genie

How do you design useful logging for an administrative PowerShell script?

Question 1 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

Log decisions, targets, start/end times, correlation identifiers, errors and verification results.

Interview · Question 12 of 34

Answer before reveal

Your draft

Write the answer you would give in an interview. The model answer stays hidden until you have drafted at least a short response.

Primary documentation

PowerShell objects and pipelines documentation

Continue
Genie guideHow do you design useful logging for an administrative PowerShell script?

Log decisions, targets, start/end times, correlation identifiers, errors and verification results.