# Run PS1 on remote server

**URL:** <https://forums.powershell.org/t/run-ps1-on-remote-server/16915>\
**Category:** PowerShell Help\
**Created:** [June 23, 2021, 9:03pm UTC](https://forums.powershell.org/t/run-ps1-on-remote-server/16915 "2021-06-23T21:03:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHELLBY](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@SHELLBY](https://forums.powershell.org/u/SHELLBY)\
**Post date:** [June 23, 2021, 9:03pm UTC](https://forums.powershell.org/t/run-ps1-on-remote-server/16915/1 "2021-06-23T21:03:46Z")

</div>

Yes i did a search. Mostly ones that comes up are not what i’m looking but could be the word i use to search.

current situation:  
logon server01 and open powershell  
run c:\Scripts\Collection.ps1 option1 option2 option3

I want to bypass remote logon,  
i can access \server01\Scripts without any credential

can i run ps1 script from \server01\Scripts\collection.ps1 options1 option2 option3?  
example Invoke-Command -ComputerName Server01 -FilePath c:\Scripts\Collection.ps1 option1 option2 option3

or would be better if i can run from window batch file because i have scripted for IF and SET for options1, 2, 3

you probably wondered, have i test it yet, no not yet. i want to make sure it is even close to working. Dont want to cause to much traffic issue if command does’t work.

any help and recommendation would be great.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 23, 2021, 11:32pm UTC](https://forums.powershell.org/t/run-ps1-on-remote-server/16915/2 "2021-06-23T23:32:27Z")

</div>

Shelby,  
Welcome to the forums.

> [@SHELLBY](#):
>
> you probably wondered, have i test it yet, no not yet.

You’re perfectly right. 😉

> [@SHELLBY](#):
>
> i want to make sure it is even close to working.

How much time would it have taken you to write a mini test script and try it? And how long did it take you to come here, create an account and write this question? 😉

> [@SHELLBY](#):
>
> Dont want to cause to much traffic issue if command does’t work.

And how much traffic can it cause with a few lines of code to test? 😉

> [@SHELLBY](#):
>
> Yes i did a search. Mostly ones that comes up are not what i’m looking but could be the word i use to search.

It took me about 30 seconds to Google for “_Powershell run script remote including arguments_” and the first hit was this:

[https://social.technet.microsoft.com/Forums/Azure/en-US/7e5d19ba-e22c-43d9-883d-0286ab6cdef5/executing-powershell-script-with-parameters-remotely?forum=winserverpowershell](https://social.technet.microsoft.com/Forums/Azure/en-US/7e5d19ba-e22c-43d9-883d-0286ab6cdef5/executing-powershell-script-with-parameters-remotely?forum=winserverpowershell)

---

<div class="post-metadata">

**Author:** ![SHELLBY](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@SHELLBY](https://forums.powershell.org/u/SHELLBY)\
**Post date:** [June 24, 2021, 2:02am UTC](https://forums.powershell.org/t/run-ps1-on-remote-server/16915/3 "2021-06-24T02:02:23Z")

</div>

As I mentioned. It’s probably the wording. I just searched run powershell from remote server.  
You had “argument” could be the crucial word.

One failed test script will send fault info to 2nd party intended. They would not like it if I keep recalling.

Nice, decided to joined to get help after many searches. My help was redirected to another site.

You are right. Very much wasted of time registering and asking and even get insulted.

Thank you I will seek help there. [https://social.technet.microsoft.com](https://social.technet.microsoft.com)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:23pm UTC](https://forums.powershell.org/t/run-ps1-on-remote-server/16915/4 "2024-05-16T20:23:59Z")

</div>


