Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Powershell Remoting as Adminstrator

Posted on 2014-11-19
6
Medium Priority
?
58 Views
Last Modified: 2016-01-07
An expert solved this script question previously which is related.  To recap this script works flawlessly on my machine (Win7 x64 PS 3.0) when I run PS as administrator.  I've enabled WinRM through GPO on the domain machine and created the firewall exception. I've tried to run this script several different ways.  First, I run it from my machine as the script was intended and I get the attached error.  This was the same error I described in previous question I linked to above.  That was solved after I enter the correct print driver name.  Secondly, I copied the script to remote machine and then remoted in (Enter-PSSession) using my credentials and I'm a domain admin.  Then I run from the remote machine and get the same error.  I'm pretty sure the problem lies with the elevated permissions.  Even on my machine I have to launch PS as administrator to get script to work.  I tested my theory on remote machine by trying to run Enable-PSRemoting and I get attached errors.  We have a GPO in place to disable UAC.  Could that be the reason I continue to get access denied on remote session?
Powershell-Error.JPG
Powershell-error2.JPG
0
Comment
Question by:ats2012
  • 2
6 Comments
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40453218
What are all the settings you applied in the enable WinRM group policy? Did you include the firewall rules?

Also, I dont think you can enable-psremoting while using a remote session. I could be wrong on that but I would think that is a security feature.
0
 
LVL 3

Expert Comment

by:markc56
ID: 40453339
Have you tried on the remote PC setting the executionpolicy to unrestricted or remotesigned?
0
 

Author Comment

by:ats2012
ID: 40453363
Josh,
I used this article to configure the WinRM Group Policy.  It does include the firewall setting.  I will to double check the firewall setting.

Mark,
I did try to Set-ExecutionPolicy to unrestricted on remote system but again was given an access denied.
0
 

Accepted Solution

by:
ats2012 earned 0 total points
ID: 40453396
OK, I feel like a dummy.  I created the WinRM GPO in a couple different OU's.  The OU I'm trying to get it working on I didn't configure the port exception on the firewall rule.  I'll likely need a few days for policy to fully take affect to test again.
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Screencast - Getting to Know the Pipeline

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question