2

I have a list of machines that a need to create a PsSession object for. Some of the machines require my default credentials, while others need a customized credential object.

How do get a reference to the default credential object used in the PS commands when you do not provide the -credential argument? I would like the following commands to perform the same result.

new-pssession $SERVER new-pssession $SERVER -credential $DEFAULT 
0

1 Answer 1

0

You can't simply grab the current user's credentials and store them in an object, the API won't let you. See Get current user's credentials object in Powershell without prompting

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.