Log in  \/ 
x
x
x
Register  \/ 
x

21
April
2015

How to get InstanceID to download a file attachment from a SCSM 2012 portal

Recently we have received a request from a customer that wanted to use our free product, SCUtils File Attachment, to let end users open file attachments related to the knowledge articles. Sometimes it is suitable to attach files like Word templates, scripts, large documents rather than place all these things into an internal content of a knowledge article. The customer planned to put direct links to the file attachments inside knowledge articles but did not want to query a SCSM SQL database each time to find InstanceID to create a link like this:

http://ssp:81/ContentHost/ClientBin/AttachmentViewer.aspx?InstanceID=D193DA70-32BB-77BD-0DA4-05A0EF9C8A2D

Instead, the client wanted to get the file attachment’s InstanceID by the knowledge article’s ID. That was a very reasonable request so I created a PowerShell script for this purpose.

SCSM file attachments related to the knowledge articles

The script uses two parameters:

  1. Computer – a name of the Service Manager 2012 management server (usually the first installed one);
  2. ArticleID – an ID of the knowledge article like KA125.

If the knowledge article has any file attachments, the script presents two columns: Id and DisplayName of the attached files.
The script utilizes the default Service Manager PowerShell commandlets, so it can be used on any computer with the installed Service Manager console.

Download

Categories: System Center 2012 Service Manager

Marat Kuanyshev

Leave a comment

You are commenting as guest.

This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.