Pester Tests
Sara
441
Reputation points
Can someone help me with writing a pester test on checking if multiple services are running on multiple servers and to pull the local users group and admin group and it it returns empty it should fail.
Kind of able to put one for one service and one server , but want to make it work for multiple service and multiple server?
describe 'PC Tests' {
$servername = ' '
$status = (get-service -computername $servername -Name 'service' ).status
it 'should be running' {
$status | should be 'Running'
}
}
Windows for business | Windows Server | User experience | PowerShell
Sign in to answer