# IPConfig Data On Demand Task

**URL:** <https://community.squaredup.com/t/ipconfig-data-on-demand-task/426>\
**Category:** Dashboard Server\
**Tags:** data-on-demand, perspective, scom-2016\
**Created:** [August 16, 2017, 2:25pm UTC](https://community.squaredup.com/t/ipconfig-data-on-demand-task/426 "2017-08-16T14:25:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![astonpa](https://community.squaredup.com/user_avatar/community.squaredup.com/astonpa/32/1088_2.png) [@astonpa](https://community.squaredup.com/u/astonpa)\
**Post date:** [August 16, 2017, 2:25pm UTC](https://community.squaredup.com/t/ipconfig-data-on-demand-task/426/1 "2017-08-16T14:25:29Z")

</div>

I’ve added a data on demand task to the Network perspective to run ipconfig. If I create this on a 2012 server then it works, but doesn’t run when looking at a 2016 server. If I edit the perspective on a 2016 server then it works, but not on 2012! Ideally, I’d like one Network perspective that would run ipconfig regardless of OS; or do I have to create OS specific perspectives? I’ve got version 1.2.4.36 of the DoD management pack.

This it the error I get when it tries to run the DoD task. Any ideas?

> System.InvalidOperationException: The task cannot be executed against the object(s) because the target of the task does not match any of the classes of the object. at Microsoft.EnterpriseManagement.Runtime.TaskRuntimeManagement.ValidateTaskTargetsInternal[T](IEnumerable`1 targets, ManagementPackTask task, EnterpriseManagementGroup enterpriseManagementGroup) at Microsoft.EnterpriseManagement.Runtime.TaskRuntimeManagement.SubmitTask(EnterpriseManagementObject instance, ManagementPackTask task, TaskConfiguration configuration, TaskStatusChangeCallback callback) at SquaredUp.Connector.ScomTask.ScomTaskController.ExecuteTask(ManagementGroup mg, EnterpriseManagementObject target, ManagementPackTask task, TaskConfiguration taskConfiguration) at SquaredUp.Connector.ScomTask.ScomTaskController.\<\>c\_\_DisplayClass7\_0.\<Execute\>b\_\_0()

---

<div class="post-metadata">

**Author:** ![astonpa](https://community.squaredup.com/user_avatar/community.squaredup.com/astonpa/32/1088_2.png) [@astonpa](https://community.squaredup.com/u/astonpa)\
**Post date:** [August 16, 2017, 2:51pm UTC](https://community.squaredup.com/t/ipconfig-data-on-demand-task/426/2 "2017-08-16T14:51:13Z")

</div>

I’ve worked around it by creating a PS task to run ‘ipconfig’ and then embedded that as a Data on Demand task on the default Network perspective. That seems to be Windows OS version agnostic.

---

<div class="post-metadata">

**Author:** ![crowdpleaser](https://community.squaredup.com/letter_avatar_proxy/v4/letter/c/50afbb/32.png) [@crowdpleaser](https://community.squaredup.com/u/crowdpleaser)\
**Post date:** [August 16, 2017, 2:45pm UTC](https://community.squaredup.com/t/ipconfig-data-on-demand-task/426/3 "2017-08-16T14:45:16Z")

</div>

Quick question; what, specifically, have you scoped the Perspective to?

---

<div class="post-metadata">

**Author:** ![astonpa](https://community.squaredup.com/user_avatar/community.squaredup.com/astonpa/32/1088_2.png) [@astonpa](https://community.squaredup.com/u/astonpa)\
**Post date:** [August 16, 2017, 2:48pm UTC](https://community.squaredup.com/t/ipconfig-data-on-demand-task/426/4 "2017-08-16T14:48:32Z")

</div>

I think the default scope is Windows Server, I’ve also tried Windows Computer.

I thought I’d cracked it with a custom PS task to run Get-NetIPConfiguration - but it looks like that won’t work on 2008 server _sigh_

---

<div class="post-metadata">

**Author:** ![crowdpleaser](https://community.squaredup.com/letter_avatar_proxy/v4/letter/c/50afbb/32.png) [@crowdpleaser](https://community.squaredup.com/u/crowdpleaser)\
**Post date:** [August 16, 2017, 2:59pm UTC](https://community.squaredup.com/t/ipconfig-data-on-demand-task/426/5 "2017-08-16T14:59:55Z")

</div>

Happy days 🙂 You can have the pleasure of marking your own answer as the correct one.
