# Invoke PowerShell Shell

**URL:** <https://forum.uipath.com/t/invoke-powershell-shell/136877>\
**Category:** Help\
**Tags:** system, activities\
**Created:** [July 25, 2019, 10:20am UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877 "2019-07-25T10:20:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nibu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nibu/32/64451_2.png) [@nibu](https://forum.uipath.com/u/nibu)\
**Post date:** [July 25, 2019, 10:20am UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/1 "2019-07-25T10:20:46Z")

</div>

How to pass Variables into Remove-Item “Variable\*” -Force -Recurse

 ![Powershell](https://global.discourse-cdn.com/uipath/original/3X/e/8/e831cc27ff1462930ca8b03061be4958be3f9ef8.png)

---

<div class="post-metadata">

**Author:** ![AshwinS2](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashwins2/32/176686_2.png) [@AshwinS2](https://forum.uipath.com/u/AshwinS2)\
**Post date:** [July 25, 2019, 10:22am UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/2 "2019-07-25T10:22:55Z")

</div>

Hi @nibu

Check this

[Pass a variable from UiPath to Invoke Powershell activity](https://forum.uipath.com/t/pass-a-variable-from-uipath-to-invoke-powershell-activity/12660)

Thanks  
Ashwin.S

---

<div class="post-metadata">

**Author:** ![Pablito](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pablito/32/385495_2.png) [@Pablito](https://forum.uipath.com/u/Pablito)\
**Post date:** [July 25, 2019, 10:49am UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/3 "2019-07-25T10:49:12Z")

</div>

Hi @nibu,  
This tutorial should help you:

> [@How to Integrate PowerShell with UiPath- Step by Step guide](https://forum.uipath.com/t/how-to-integrate-powershell-with-uipath-step-by-step-guide/112279):
>
> How to Integrate PowerShell with UiPath This topic is a step by step guide for integrating Powershell with Uipath. There is an ‘Invoke Powershell Activity’ available in Uipath which can be used to run the powershell scripts. For our example purpose, let us consider a simple powershell script which gives us the status of windows services on the machine. This script will have two input parameters: • ServiceState (String) – To get the status of service. For e.g. ‘Running’ , ‘Stopped’ etc • Outp…

---

<div class="post-metadata">

**Author:** ![Head](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/head/32/13066_2.png) [@Head](https://forum.uipath.com/u/Head)\
**Post date:** [July 25, 2019, 11:10am UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/4 "2019-07-25T11:10:08Z")

</div>

Hi.

Why don’t do this way: “Remove-Item “+PC\_Folder\_Path+” -Force -Recurse” ?

---

<div class="post-metadata">

**Author:** ![nibu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nibu/32/64451_2.png) [@nibu](https://forum.uipath.com/u/nibu)\
**Post date:** [July 25, 2019, 6:37pm UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/5 "2019-07-25T18:37:04Z")

</div>

Good idea @Head  
However the power shell don’t work with any code !! ![power](https://global.discourse-cdn.com/uipath/original/3X/c/3/c3e26d695704f99fe918d0aa09dcbf9320c0044a.gif)

---

<div class="post-metadata">

**Author:** ![Pablito](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pablito/32/385495_2.png) [@Pablito](https://forum.uipath.com/u/Pablito)\
**Post date:** [July 26, 2019, 6:04am UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/6 "2019-07-26T06:04:40Z")

</div>

Based on what do you want to achieve with PS you need to choose proper argument type:  
 ![image](https://global.discourse-cdn.com/uipath/original/3X/a/1/a19ae230867091d60dda060d0671b1de4d769a4c.png)

---

<div class="post-metadata">

**Author:** ![nibu](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nibu/32/64451_2.png) [@nibu](https://forum.uipath.com/u/nibu)\
**Post date:** [July 26, 2019, 1:56pm UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/7 "2019-07-26T13:56:05Z")

</div>

Thank you @Pablito

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [July 29, 2019, 1:56pm UTC](https://forum.uipath.com/t/invoke-powershell-shell/136877/8 "2019-07-29T13:56:12Z")

</div>

Closed on July 29, 2019, 1:56pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
