A Windows-based DBA team must automate the same health checks across 60 SQL Server instances, reading Windows event logs and service states as well as running queries on each instance. Which scripting language is the most natural fit?
Select an answer to reveal the explanation.
Short Explanation
When you're automating Windows boxes, PowerShell is the native toolbox: services, event logs and remote sessions are all right there. Add database modules and you can query every instance from the same script. The trap is Unix shell, which is great, just not on the platform you're actually running.
Full Explanation
PowerShell is Microsoft's task automation shell and scripting language, built into Windows and designed around administering the operating system. It exposes event logs, services, the registry and remote execution as objects that scripts can filter and act on, and it supports running the same script against many servers. Database modules and .NET data providers let the same script connect to each instance and run queries, so OS-level and database-level checks live together in one automation. Perl is a general-purpose language with strong text processing, but on Windows it is an add-on rather than the native administration tool, and it lacks PowerShell's built-in object access to services and event logs. Unix shell scripting is the native automation tool on Linux and Unix hosts; on a Windows estate it would need extra layers and still would not provide native access to Windows services and logs. Client-side JavaScript runs in a user's browser and has no access to server services, event logs or scheduled administration tasks. Exam caveat: PowerShell also runs on Linux and macOS, and Python could perform many of these checks, but the objective's pairing of PowerShell with Windows administration is the expected association. Operational check: run a pilot script against three instances that returns service status, recent error events and a test query result, and confirm the output for each instance is correct before scaling to all 60.