# Invoking Powershell script from Rule

**URL:** <https://developer.sailpoint.com/discuss/t/invoking-powershell-script-from-rule/11575>\
**Category:** IIQ Discussion and Questions\
**Tags:** identityiq, rules\
**Created:** [May 23, 2023, 7:22am UTC](https://developer.sailpoint.com/discuss/t/invoking-powershell-script-from-rule/11575 "2023-05-23T07:22:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ismaelmoreno1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ismaelmoreno1/32/2756_2.png) [@ismaelmoreno1](https://developer.sailpoint.com/discuss/u/ismaelmoreno1)\
**Post date:** [June 13, 2023, 6:38pm UTC](https://developer.sailpoint.com/discuss/t/invoking-powershell-script-from-rule/11575/3 "2023-06-13T18:38:30Z")

</div>

hi @Prathyusha_174

The code to invoke Powershell looks fine.  
Could you try add following line in FileCreationRule.xml file at the beginig of the rule?

```auto
Add-type -path C:\<IQServicePath>\Utils.dll

```

As you mentioned, rule works properly though application connector Rule, because you are using IQService to provision, but when you try execute powershell code using external rule, in the code you are not importing IQService Library

---

_[View the full topic](https://developer.sailpoint.com/discuss/t/invoking-powershell-script-from-rule/11575)._
