# Struggling with PS Credentials

**URL:** <https://forums.powershell.org/t/struggling-with-ps-credentials/13165>\
**Category:** PowerShell Help\
**Created:** [September 19, 2019, 7:29am UTC](https://forums.powershell.org/t/struggling-with-ps-credentials/13165 "2019-09-19T07:29:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinoath](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@sinoath](https://forums.powershell.org/u/sinoath)\
**Post date:** [September 19, 2019, 7:29am UTC](https://forums.powershell.org/t/struggling-with-ps-credentials/13165/1 "2019-09-19T07:29:50Z")

</div>

hi everyone,  
first of all thanks to infos found in [powershell.org](http://powershell.org) forums i was able to set my PCs for remoting  
Now I am able to use commands like Invoke-Command and Enter\_PSSession like a boss ^^

To do so I activated the administratr user on both PCs so i can work on one remoting to the other each ways.

My very rookie question, and i apologize for that, is about -Credentials parameter, wich I use passing the local  
admin username and password (i mean local to the remote pc). This work flawlessly.

But: what if i want to use the main user credentials, which is a the Microsoft Account used to register my OS license?

- I already tried to pass the local username and PIN (the alphanumeric string used to log in Windows 10).
- I even tried to pass the Microsoft Account Username (the e-mail) and password.
- I even tried combination of both without any usefull result.

My main Windows account, sinoath, has admin rights so I think this isn’t the problem in my case  
Maybe the authorization check of the commands i mentioned is possible only with local accounts…

Any tip or suggestion will be appreciated  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![rob-simmers](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rob-simmers/32/1010_2.png) [@rob-simmers](https://forums.powershell.org/u/rob-simmers)\
**Post date:** [September 19, 2019, 9:20am UTC](https://forums.powershell.org/t/struggling-with-ps-credentials/13165/2 "2019-09-19T09:20:09Z")

</div>

What exactly are you trying to do? Can you share code? Are you trying to authenticate on the local machine with these credentials?

---

<div class="post-metadata">

**Author:** ![sinoath](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@sinoath](https://forums.powershell.org/u/sinoath)\
**Post date:** [September 19, 2019, 2:54pm UTC](https://forums.powershell.org/t/struggling-with-ps-credentials/13165/3 "2019-09-19T14:54:30Z")

</div>

> [@](#):
>
> What exactly are you trying to do? Can you share code? Are you trying to authenticate on the local machine with these credentials?

what am I trying to do is to open a PS Session with the credentials of user sinoath (that is part of Admin Group) instead of the default Admin user automatically created by the windows OS. The commands I’m using are:

`$cred Get-Credential -Credential administrator`

`Enter\_PSSession Server1 -Credential $cred`

This work just fine. The first line popup a window, i write the password for administrator user and thats it. But when I try to use my default account, which is sinoath (that is part of Admin Group too) i cant understand what combination of username password i have to insert.  
User sinoath is the one i used to register the license of windows 10 pro, and in fact it is a Microsoft account, bind to an hotmail e-mail. I also did set up a pin for sinoath user to log in windows OS and neighter this combination sinoath/pin nor the hotmail/password

My question is: Credentials accepted by the commands i wrote are only local ones or i can feed Microsoft Account credentials? If it is so, how can i do it?

I’m sorry for my poor english and i hope i explained myself better  
thanks for the help

---

<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:31pm UTC](https://forums.powershell.org/t/struggling-with-ps-credentials/13165/4 "2024-05-16T20:31:23Z")

</div>


