2011년 5월 31일 화요일

SCOM: Invoke command via WinRM

After SCOM agent installation, It opens the way to communicate to Linux server directly. SCOM agent use WinRM to interact between management server and managed hosts.


Using WinRM, it is able to invoke command or get information. I write two examples. The first is executing a script on Linux and the other is getting performance information on the same server.


Command 1 : Execute command
c:\>winrm invoke ExecuteShellCommand http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx  -r:https://[server name]:1270/wsman -u:[user id] -p:[password] -auth:basic -skipcacheck -encoding:utf-8 -skiprevocationcheck -file:c:\file.xml

file.xml: 


Command 2 : Getting information
PS C:\> winrm enumerate http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_ProcessorStatisticalInformation?__cimnamespace=root/scx   -r:https://[server name]:1270/wsman -u:[user id] -p:[password] -auth:basic -skipcacheck -encoding:utf-8 -skiprevocationcheck



Please refer to this site for more information about Microsoft Cross-Platform Providers (XPlatProviders): http://scx.codeplex.com/wikipage?title=xplatproviders

댓글 없음:

댓글 쓰기