I started a new Opalis Integration Pack project that allows administrators to easily communicate with Service Manager. The Integration Pack that Microsoft delivers is great, but some often used activities (I use) are not present and you have to use scripts to achieve your goals. I try to fill this gap with my own Integration Pack that will be continuously extended over the next months. Input, Ideas and Feedback are very welcome to help Service Manager administrators and engineers doing more with less!
UPDATE: Version 2.0 released!
IP Information (01/04/2011)
Version: 1.5
Number of Activities: 4
Requirements on 32bit Opalis Action Servers
- Install the Service Manager Console on the Opalis Action Server.
- Copy the folder “SDK Binaries” from the Service Manager Management Server install directory to the Service Manager install directory on the Opalis Action Server.
- The IP is based on the SMLets-Modulefor Powershell. Copy this module to the Opalis Action Server (%windir%\system32\WindowsPowershell\V1.0\Modules).
- Change the Powershell execution policy to remote signed (set-executionpolicy remotesigned).
Additional Requirements on 64bit Opalis Action Servers
When your Action Servers are running on a 64Bit OS like Windows Server 2008 R2, some additional requirements are existing.
- Because Opalis uses the 32bit version of Powershell there are 2 additional steps:
- Copy the SMLets module to %windir%\sysWOW64\WindowsPowerShell\V1.0\Modules
- Change the execution policy in the 32bit version of Powershell
- A complete key of the registry needs to be copied to another location (export/import will be fine):
- Source: HKLM\Software\Microsoft\System Center\*
- Destination: HKLM\Software\WOW6432Node\Microsoft\System Center\*
Now you are ready to go and use the activities in the Integration Pack!
Activity “Auto-close resolved Incidents”
This activity will look for incidents that have been resolved for a specified amount of time and will update their status to “closed”. The Activity takes two inputs:
- MS: The name of the Service Manager Server to connect to
- Days: The number of days an incident must be resolved and untouched before it gets closed
Activity “Auto-close resolved Problems”
This activity will look for problems that have been resolved for a specified amount of time and will update their status to “closed”. The Activity takes two inputs:
- MS: The name of the Service Manager Server to connect to
- Days: The number of days a problem must be resolved and untouched before it gets closed
Activity “Export unsealed Management Packs”
This activity will export all unsealed Management Packs to a specified location. The Activity takes two inputs:
- MS: the name of the Service Manager Server to connect to
- Path: The location where the Management Packs will be saved to
Activity “Auto-close completed Change Requests”
This activity will look for change requests that have been completed for a specified amount of time and will update their status to “closed”. The Activity takes two inputs:
- MS: The name of the Service Manager Server to connect to
- Days: The number of days a change request must be completed and untouched before it gets closed
That’s it for now. As already mentioned, over the next months, several new Activities will be added to the integration pack to make it more valuable. Input, Ideas and Feedback are very welcome!
UPDATE: The solution is now available on Codeplex!
UPDATE: The solution is now available on the Technet Gallery!
regards
Marcel
Pingback: Opalis Integration Pack (OIP) für System Center Service Manager 2010 « itnetx.ch Blog
Hi Marcel,
wow – sounds great, thanks for sharing.
Have you considered to upload you IP to Codeplex?
Thanks,
Peter Forster, MVP Virtual Machine, Austria
Hi Peter
Thanks. Yes, I will upload it soon to codeplex as well as the new technet gallery (gallery.technet.microsoft.com).
Schönen Gruss nach Österreich 🙂
regards
Marcel
Wow, great post. I can’t wait to try it out.
Pingback: [Opalis] Un Integration Pack pour SCSM - Jean-Sébastien DUCHENE Blog's
Hi Marcel,
Using the integration pack and all working fine except for the ‘Unsealed MP Backup’. I have carried out the pre-reqs you have listed as the other activities are running the correctly. Here is the error I receive in Opalis:
_________________________________________________
System error.
Exception: CmdletInvocationException
Target site: PipelineBase.Invoke
Stack trace:
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context
______________________________________________
Any assistance would be appreciated.
Many Thanks
Mark
Hey Mark
I tried it some minutes ago, it works fine in my environment. This is the script behind the IP activity. Try if this works correctly and let me know …
regards
Marcel
**
param($ms,$path)
import-module smlets
$SMDefaultComputer = “$ms”
Get-SCManagementPack | where {$_.sealed -EQ $false} | Export-SCManagementPack -TargetDirectory $path
Hi Marcel,
Worked it out!!! My bad.
I was expecting the backup output to occur on the Service Manager server. I had created a folder on the SM server called ‘D:\MPbackup’ and used that for the path statement in Opalis.
As soon as I changed the path statement to the UNC of the folder all worked fine.
Thanks for your help.
Mark
Hi Marcel
I’ve been using your SCSM Extension v2.0 for a few days now and, while I love the functionality of the IP, I am have a few niggles with the current version (v2.0):
*** SOME MINOR NIGGLES ***
1) The requirements for 64-bit Opalis Action Servers in v1.5 are still valid for v2.0. For instance, you must configure the PowerShell execution policy and export/import the registry keys otherwise the Opalis actions will not work. Additionally the ‘SMLets’ module folder must be copied from the 64-bit path to the 32-bit path for Powershell. The reason I say this is that your v2.0 documentation does not make reference to these additional requirements and only through viewing the v1.5 requirements was I able to deduce this.
2) Some, if not all, of your Powershell scripts use the ‘Invoke-command’ cmdlet to use Powershell Remoting against a target system. As far as I can tell, the account performing this must be an administrator of the target system for Powershell Remoting to work. This is particularly poinient when testing an Opalis Policy which uses the logged in users credentials rather than the Opalis Service account. can you please verify this for me and update the documentation?
3) I have a problem with the “Export Unsealed Management Packs” action ‘BasePath’ property. My colleague, Mark Newton, already pointed out that it seems to work better when specifying a UNC path rather than a local path. However, I have a problem setting a UNC path that is on a remote server to the Service Manager server I’m running the action against. For instance, the SM server is ‘ServerA’ and I want to backup to ‘\\ServerB\MPBackup’ – this doesn’t work. If the backup location and SM server are the same, the action works. Can you please clarify this for me?
*** NOW THE MAIN PROBLEM ***
4) Both actions “Auto-close Completed Change Requests” and “Auto-close Resolved Incidents” fail when the Powershell attempts to enumerate all ‘Completed/Resolved’ Changes or Incidents.
To put this into context, our test SM system has approximately 100 incidents with a ‘Resolved’ status and when we use the SCSM Extension action to auto-close any that are over 7 days old, the Powershell executes correctly and does not error. Some resolved incidents are closed as per the retention period.
On the flip side, our prouduction SM system has 15,000 incidents with a ‘Resolved’ status and the same SCSM Extension action returns the following error from Powershell: “Processing data for a remote command failed with the following error message: The WSMan provider host process did not return a proper response. A provider in the host process may have behaved improperly”
Through troubleshooting, I was able to determine that the code within the scriptblock works perfectly if run locally on the SM server – so it must be some limitation in Powershell Remoting that is causing this issue. I assume that some kind of buffer or timeout is being reached and is therefore throwing an exception during the remote session. Again, if the total number of records is fairly low (say 1 to 200), the Powershell code works excellently. I don’t know the precise number of records where this issue occurs (limited testing time), so could you please verify my findings?
For the meantime, I have extracted the scriptblock to it’s own Powershell script and used a ‘Run Program’ action in the Opalis Policy to execute it on the SM server. This is a shabby workaround but will do until such time you can resolve any limitations in the Powershell Remoting capabilities of SCSM Extensions.
Many thanks
Mark
Hey Mark
Thanks for your great feedback! I try to answer your questions …
1) Correct, i should update the documentation. seems that i forgot that. thanks.
2) I guess all of the activities use invoke-command, but I’m not sure if local admin rights are really needed, I dont think so, but I have to test that
3) Exporting to another Server is not working because of authentication delegation – I guess this could be fixed by allowing delegation on the computer account in ADDS, but I never tested that
4) Correct, I had the same issue already weeks ago. I don’t know why this is the case, but’s it’s indeed a Powershell Remoting problem.
After finishing V2 of the OIP, I also found some issues with Powershell remoting, so I decided to make V3 without it. This is more flexible and a lot easier to create the scripts and return data. problem now is that I dont want to invest too much time with SCSM 2010 but wait to include some activities for SCSM 2012 as soon at it’s out. Also, some scripts could be optimized. So if you are interessted in joining the SCSM V3 OIP development team and support the dev, feel free. Right now there’s only 1 member … me 🙂
Until then, you can optimize the OIP for your needs on your own. If you want I can send you the source. Just drop me a mail at zehner at itnetx dot ch.
again, thanks for your valuable feedback!
regards
Marcel