# Powershell to CMD

**URL:** <https://forums.powershell.org/t/powershell-to-cmd/13842>\
**Category:** PowerShell Help\
**Created:** [February 20, 2020, 11:46am UTC](https://forums.powershell.org/t/powershell-to-cmd/13842 "2020-02-20T11:46:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![perdesi](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@perdesi](https://forums.powershell.org/u/perdesi)\
**Post date:** [February 20, 2020, 11:46am UTC](https://forums.powershell.org/t/powershell-to-cmd/13842/1 "2020-02-20T11:46:10Z")

</div>

Hi,

When I call CMD as a different user in powershell, can I pass commands from Powershell to the CMD for execution?

Example:

```
Start-Process cmd -Credential (Get-Credential "$env:USERDNSDOMAIN\")
```

Once the window is open, I would like for it to process the command in the new CMD window:

```
Echo Hello World!
```

Thank you!

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [February 20, 2020, 12:18pm UTC](https://forums.powershell.org/t/powershell-to-cmd/13842/2 "2020-02-20T12:18:57Z")

</div>

of course, Use -ArgumanetList parameter will do the job.

```
Start-Process -FilePath cmd.exe -ArgumentList 'echo HelloWorld' -Credential (Get-Credential)
```

It’s always recommended and good read the help documentation for any cmdlet in PowerShell.

```
Get-Help Start-Process -ShowWindow
```

---

<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:30pm UTC](https://forums.powershell.org/t/powershell-to-cmd/13842/3 "2024-05-16T20:30:25Z")

</div>

Closed on May 16, 2024, 8:30pm UTC


