We help IT Professionals succeed at work.
Get Started

powershell, which credentials should i use

fieldj
fieldj asked
on
49 Views
Last Modified: 2015-08-18
I am new to power shell so this may be a simple question.  I have configured winRM in my domain and this is working.

My workstation is Win 7 Pro SP1 running PSversion 4.0.  I'm logged in as myself, a domain user who is a member of the administrators group (but not a Domain Admin).  My question is, what credentials should I run the ps console in?
 
If I just click on windows power shell, not much works [ eg. Get-Service -name B* -ComputerName is-tr-01 ] fails with a privilege error
If I right click and Run As Administrator the above still does not work.
If I shift click and Run as Another User, use a domain admin account, the above does work, however seems to create a problem, such as if I want to pipe to csv, [eg.  Get-Service -Name b* -ComputerName is-tr-01 | Export-Csv c:\services.csv ] fails with access to c: path is denied.
If I Run As Administrator [ Get-Service -Name b* | Export-Csv c:\services.csv  ] removing the remote computer, this does work.
Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2014
Commented:
This problem has been solved!
Unlock 2 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE