# PowerShellを呼び出し の使い方

**URL:** <https://forum.uipath.com/t/powershell/332872>\
**Category:** フォーラム\
**Created:** [July 28, 2021, 6:59am UTC](https://forum.uipath.com/t/powershell/332872 "2021-07-28T06:59:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![miwa\_yamamoto](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/miwa_yamamoto/32/176649_2.png) [@miwa\_yamamoto](https://forum.uipath.com/u/miwa_yamamoto)\
**Post date:** [July 28, 2021, 6:59am UTC](https://forum.uipath.com/t/powershell/332872/1 "2021-07-28T06:59:20Z")

</div>

UiPath初心者です。  
以下の状態のものを、UiPathで作りたいです。  
アクティビティ「PowerShellを呼び出し」を使うのかと思いましたが、  
入力方法が全く分かりませんでした。  
教えて頂きたくよろしくお願いいたします。

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

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [July 29, 2021, 8:55am UTC](https://forum.uipath.com/t/powershell/332872/2 "2021-07-29T08:55:08Z")

</div>

こんにちは

まずは  
IsScript プロパティにチェックを入れて  
CommandTextプロパティに、スクリプトをそのまま記述してみてはと思います。

---

<div class="post-metadata">

**Author:** ![miwa\_yamamoto](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/miwa_yamamoto/32/176649_2.png) [@miwa\_yamamoto](https://forum.uipath.com/u/miwa_yamamoto)\
**Post date:** [August 2, 2021, 6:31am UTC](https://forum.uipath.com/t/powershell/332872/3 "2021-08-02T06:31:00Z")

</div>

遅くなり申し訳ございません。

ありがとうございます。  
CommandTextプロパティにそのままを書いてみたのですが、「式の終わりが必要です」とエラーになりました。  
そのまま貼付ではなく、何か所作が必要だったでしょうか。  
教えて頂きたくよろしくお願いいたします。

 ![image](https://global.discourse-cdn.com/uipath/original/3X/0/b/0bef4fa9e9fd52ce0fcdc2698f18aa874ee7dbb9.png)

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [August 2, 2021, 6:38am UTC](https://forum.uipath.com/t/powershell/332872/4 "2021-08-02T06:38:50Z")

</div>

こんにちは

まず、このプロパティに直接コマンドを記述する場合は、ダブルクォートで囲む必要があります。

また入力はコマンド部分だけですので、例えば、「実際に手で打ち込む部分」だけを記述ください。

---

<div class="post-metadata">

**Author:** ![miwa\_yamamoto](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/miwa_yamamoto/32/176649_2.png) [@miwa\_yamamoto](https://forum.uipath.com/u/miwa_yamamoto)\
**Post date:** [August 2, 2021, 6:49am UTC](https://forum.uipath.com/t/powershell/332872/5 "2021-08-02T06:49:05Z")

</div>

ありがとうございます。  
なるほどです。  
一度入力し、エンターを押し、再度入力となりますが、  
このような場合は、行を変えて2回入力ですか。  
現在、このようにしてみましたが、エラーとなっております。

 ![image](https://global.discourse-cdn.com/uipath/original/3X/b/9/b9e38975576bd8b4c3f9d2cd130087a2638c7222.png)

---

<div class="post-metadata">

**Author:** ![jeevith](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jeevith/32/288449_2.png) [@jeevith](https://forum.uipath.com/u/jeevith)\
**Post date:** [August 2, 2021, 6:49am UTC](https://forum.uipath.com/t/powershell/332872/6 "2021-08-02T06:49:43Z")

</div>

こんにちは @miwa_yamamoto 、

これらのスレッドが見えますか？ UiPathでInvokePowershellを使用する方法を示します

- [5MBを超える場合、ファイルサイズ（.pdfファイル）を減らす方法は？ -ヘルプ/スタジオ–UiPathコミュニティフォーラム]（[https://forum.uipath.com/t/how-to-reduce-file-size-pdf）-files-if-greater-than-5mb](https://forum.uipath.com/t/how-to-reduce-file-size-pdf%EF%BC%89-files-if-greater-than-5mb) / 334135/7 ）

- [uipathからjupyterノートブックを開くのに助けが必要-ヘルプ/アクティビティ-UiPathコミュニティフォーラム]（[Need help opening jupyter notebook from uipath - #7 by jeevith](https://forum.uipath.com/t/need-help-opening-jupyter-notebook-from-uipath/332508/7) ）

コマンドは「COMMANDTEXT」タイプである必要があり、前述のようにIsScriptチェックが行われます。 @Yoichi

グーグル翻訳をありがとう！

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [August 2, 2021, 6:56am UTC](https://forum.uipath.com/t/powershell/332872/7 "2021-08-02T06:56:10Z")

</div>

こんにちは

行間でダブルクォートを付ける必要はないと思います。

```
"cd c:\\xxxxxx
 $i=0;xxxxxxxx"

```

のようにしてみてください

---

<div class="post-metadata">

**Author:** ![miwa\_yamamoto](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/miwa_yamamoto/32/176649_2.png) [@miwa\_yamamoto](https://forum.uipath.com/u/miwa_yamamoto)\
**Post date:** [August 2, 2021, 7:11am UTC](https://forum.uipath.com/t/powershell/332872/8 "2021-08-02T07:11:25Z")

</div>

ありがとうございます。  
お陰様で無事に作成出来ました。

どうもありがとうございます。

---

<div class="post-metadata">

**Author:** ![miwa\_yamamoto](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/miwa_yamamoto/32/176649_2.png) [@miwa\_yamamoto](https://forum.uipath.com/u/miwa_yamamoto)\
**Post date:** [August 2, 2021, 7:14am UTC](https://forum.uipath.com/t/powershell/332872/9 "2021-08-02T07:14:07Z")

</div>

ありがとうございます。  
1つ目は権限が無い為か無理でしたが、2つ目は確認することが出来ました。  
大変勉強になります。  
どうもありがとうございます。

---

<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:** [August 5, 2021, 7:14am UTC](https://forum.uipath.com/t/powershell/332872/10 "2021-08-05T07:14:57Z")

</div>

Closed on August 5, 2021, 7:14am UTC

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