# Script to validate credentials then start a program

**URL:** <https://forums.powershell.org/t/script-to-validate-credentials-then-start-a-program/13981>\
**Category:** PowerShell Help\
**Created:** [March 18, 2020, 9:47am UTC](https://forums.powershell.org/t/script-to-validate-credentials-then-start-a-program/13981 "2020-03-18T09:47:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![barios](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@barios](https://forums.powershell.org/u/barios)\
**Post date:** [March 18, 2020, 9:47am UTC](https://forums.powershell.org/t/script-to-validate-credentials-then-start-a-program/13981/1 "2020-03-18T09:47:46Z")

</div>

Hello, I am trying to run a script to validate users credentials via active directory and then once validated it proceeds to run a program. At the moment, the credentials are being validated but the credentials are not being passed to run the program. The program launches with my userid rather than the entered domain user credentials. Any ideas on how i can achieve this?

&nbsp;

```
"$($_.Exception.Message)
```

---

<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:** [March 18, 2020, 7:39pm UTC](https://forums.powershell.org/t/script-to-validate-credentials-then-start-a-program/13981/2 "2020-03-18T19:39:18Z")

</div>

This question already gets answers here:

[https://powershell.org/forums/topic/script-to-validate-credentials-then-start-a-program-2/#post-211050](https://powershell.org/forums/topic/script-to-validate-credentials-then-start-a-program-2/#post-211050)

---

<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/script-to-validate-credentials-then-start-a-program/13981/3 "2024-05-16T20:30:37Z")

</div>

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


