Spot on thanks.
Peter Hakesley | Monitoring & Automation Technical Lead Engineer, Data Centre Services t: +44(0)845 155 6556 ext: 4006 e: [email protected] | w: www.scc.com<http://www.scc.com/> a: SCC, CV1, Cole Valley, 20 Westwood Avenue, Tyseley, Birmingham B11 3RZ From: [email protected] [mailto:[email protected]] On Behalf Of Christopher Flesher Sent: 17/August/2015 14:39 To: [email protected] Subject: [msmom] RE: Setting registry keys on target machines from SCOM. For my tasks I'm using %windir%\system32\reg.exe and it works well. [cid:[email protected]] Christopher Flesher IT Services The University of Chicago (773)-834-2878 From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Pete Hakesley Sent: Monday, August 17, 2015 8:30 AM To: MSMOM ([email protected]<mailto:[email protected]>) <[email protected]<mailto:[email protected]>> Subject: [msmom] Setting registry keys on target machines from SCOM. Using Kevin Holman's (thanks Kevin) blog I have managed to create my dynamic groups based on registry keys. However I am struggling to create an Agent/Console task to set the key(s) on the target machines. My Example HKLM\Software\MYSCOM\SupportLevel Values are Noting, 1, 2 or 3 Each will be mapped to a dynamic group which correspond to service levels e.g. Standard, Enhanced, Custom Monitoring. I now want three tasks to set the value of the registry key. I have tried to create an agent task with: Command: %windir\system32\cmd.exe Parameter: reg add HKEY_LOCAL_MACHINE\SOFTWARE\MYSCOM /v SupportLevel /f /t REG_DWORD /d "1" This keeps failing on the target machine with Event ID 1 Error - Source WSH with detail End of Folder Script Has anyone managed to set registry keys via console/agent tasks? Peter Hakesley | Monitoring & Automation Technical Lead Engineer, Data Centre Services t: +44(0)845 155 6556 ext: 4006 e: [email protected]<mailto:[email protected]> | w: www.scc.com<http://www.scc.com/> a: SCC, CV1, Cole Valley, 20 Westwood Avenue, Tyseley, Birmingham B11 3RZ
