ServiceNow-SCCM integration without SNOW orchestartion

Solution to bypass SNOW orchestration for Service Portal to be used as Frontend for application install

Action from SNOW

  1. User browses to Appstore(Service Portal) instance with web browser.
  2. User locates application to install and “orders” it which generate new request in SNOW that defines the application is ordered with Application Name, Device Name and Collection name.
  3. Request follow the approval process.
  4. SNOW export the required info in csv and save it on specific shared location(SCCM dedicated MID server).
  5. Request status will be “Work in Progress/Deploying” state till it is completed(New status received from script/connector).

Action from Script

 

  1. Script/connector reside on dedicated SCCM MID server executes periodically and accessing csv on shared location(exported from SNOW) to query for new requested items that have been approved for deployment.
  2. Script/connector execute and add device to collection based on the input received from csv.
  3. When device is added to collection and everything worked, script/connector send back the status to SNOW with periodic sync and requested item in ServiceNow marked as complete.
  4. If something went wrong, connector marks the request as failed in ServiceNow and assign Task to support team.

Dedicated MID server will be built on SCCM CAS site which will reduce any action over network and execute scripts on same server.SNOW-SCCM_Proposed

Advertisements

ConfigMgr – SQL query to find Package type

select *,

‘Package Type (Text)’ =

Case

when v_Package.PackageType = 0 Then ‘Software Distribution Package’

when v_Package.PackageType = 3 Then ‘Driver Package’

when v_Package.PackageType = 4 Then ‘Task Sequence Package’

when v_Package.PackageType = 5 Then ‘Software Update Package’

when v_Package.PackageType = 6 Then ‘Device Setting Package’

when v_Package.PackageType = 7 Then ‘Virtual Package’

when v_Package.PackageType = 8 Then ‘Application’

when v_Package.PackageType = 257 Then ‘Image Package’

when v_Package.PackageType = 258 Then ‘Boot Image Package’

when v_Package.PackageType = 259 Then ‘Operating System Install Package’

Else

‘Unknown’

End

from v_Package

 

ConfigMgr – SCCM Advertisement, Package Type and Program Information with Target Count

select CollectionID, COUNT(*) as MemberCount into #TempTable from v_FullCollectionMembership group by CollectionID

SELECT dbo.v_Advertisement.AdvertisementID,
dbo.v_Advertisement.AdvertisementName,
‘PackageType’ =
Case
when v_Package.PackageType = 0 Then ‘Software Distribution Package’
when v_Package.PackageType = 3 Then ‘Driver Package’
when v_Package.PackageType = 4 Then ‘Task Sequence Package’
when v_Package.PackageType = 5 Then ‘Software Update Package’
when v_Package.PackageType = 6 Then ‘Device Setting Package’
when v_Package.PackageType = 7 Then ‘Virtual Package’
when v_Package.PackageType = 8 Then ‘Application’
when v_Package.PackageType = 257 Then ‘Image Package’
when v_Package.PackageType = 258 Then ‘Boot Image Package’
when v_Package.PackageType = 259 Then ‘Operating System Install Package’
Else
‘Unknown’
End,
v_Collection.CollectionID,
v_Collection.Name as CollectionName,
#TempTable.MemberCount,
dbo.v_Advertisement.PackageID,
dbo.v_Package.Name as PackageName,
dbo.v_Package.PkgSourcePath,
dbo.v_Advertisement.ProgramName,
dbo.v_Program.CommandLine

FROM dbo.v_Advertisement INNER JOIN
dbo.v_Program ON dbo.v_Advertisement.PackageID = dbo.v_Program.PackageID AND
dbo.v_Advertisement.ProgramName = dbo.v_Program.ProgramName INNER JOIN
dbo.v_Package ON dbo.v_Advertisement.PackageID = dbo.v_Package.PackageID INNER JOIN
dbo.v_Collection ON dbo.v_Advertisement.CollectionID = dbo.v_Collection.CollectionID INNER JOIN
#TempTable ON dbo.v_Advertisement.CollectionID = #TempTable.CollectionID