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