Struggling with PS Credentials

Welcome Forums General PowerShell Q&A Struggling with PS Credentials

Viewing 2 reply threads
  • Author
    Posts
    • #178329
      Participant
      Topics: 4
      Replies: 11
      Points: 103
      Rank: Participant

      hi everyone,
      first of all thanks to infos found in 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

    • #178377
      Participant
      Topics: 10
      Replies: 1375
      Points: 1,481
      Helping Hand
      Rank: Community Hero

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

    • #178479
      Participant
      Topics: 4
      Replies: 11
      Points: 103
      Rank: Participant

      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

Viewing 2 reply threads
  • The topic ‘Struggling with PS Credentials’ is closed to new replies.