Hello!
I am not usually working with SCOM but found something i wanted to create now during summer when it's a bit of spare time here at work.
My goal is to create a script (powershell) that i can put on desktop of each domain member in domain that will put the server in maintenancemode when run.
I thought this to be fairly easy but i run in to trouble quite fast with my script, from what i have gathered i need to fin out what SCOMclassInstance a server is part of before i can put it in maintenancemode so i used the following script.
$FQDN
=
"$env:computername."+"$env:userdnsdomain"
$Instance=Get-SCOMClassInstance-Name$FQDN
But i get a error when doing so
Get-SCOMClassInstance : The Data Access service is either not running or not yet initialized.
I have confirmed that the Data access service is running and tried to restart it without any progress. Anyoine have a idea ?
Kind Regards
Lee