Being a newbie to Powershell, seeking advise from you…!
I’m a wintel support guy and looks after hundreds of servers running equal number of applications. my day in office starts with healthcheck of servers by looking applications services, disk space, URL status, scheduled job status …etc. to make my job easy, i’m thinking to automate health check report using Powershell.
I have Server inventory sheet which contains ServerName, ServiceType, Prod/Dev Env…etc.
Ex:
ServerName ServiceType Prod/Dev Env
Svr01 App1 Prod
Svr02 App1 Dev
Svr03 App2 Prod
Svr04 App3 Prod
My question is, by importing CSV file, how do I pass multiple parameters to multiple functions to get healthcheck report for disk, application service status (many servers have specific application service name), last reboot…etc…
Expected output
Disk Information:
ServerName ServiceType Device ID Total Size, free Space
Svr01 App1 C: 100 10
Service Status:
ServerName App ServiceName Status Env
Svr01 AppService1 Running Prod
Svr02 AppService2 Stopped Prod
Svr03 AppService3 Running Prod
Read through our free book (eBooks menu) on Creating HTML Reports in PowerShell. It walks through a very similar, simplistic example of this, including producing an HTML-formatted report at the end.
Below is the piece of code where I get output for single/first server only…How do I pass array to function? so that I can get output for all servers listed in CSV…