Link to home
Start Free TrialLog in
Avatar of J.R. Sitman
J.R. SitmanFlag for United States of America

asked on

2012 R2 server does not have domain administrator as a user

I'm logged on to a new 2012 R2 server that my assistant built.  (his first)  I was trying to run a Powershell script and it failed with "access denied' to files I was trying to delete in the system32 folder.  
When I checked the security permissions there was no domain administrator in there.
I looked in users and the only user was Administrator for the computer, not the domain.

I've never seen this before.  What is wrong and how do I fix it?
Avatar of Chris Swinney
Chris Swinney
Flag of United States of America image

Is it joined to a domain?
Is this joined to another domain or is it a standalone DC?
Avatar of Shaun Vermaak
The domain users (including domain groups and user) do not show locally unless you are checking group members or ACLs assigned to resources such as files/folders. Where are you checking? Please post some screenshots
Avatar of J.R. Sitman

ASKER

yes part of a domain.  See attachments

User generated image
User generated image
User generated image
No idea why you added the user... I never do that.  The Domain Administrator is part of the Domain Administrators group.  By Default, this group is included in the local computer's "Administrators" group.  So thanks to group membership, you have the administrator rights.

Would have been helpful to post the PowerShell window's errors (including the window title).... my guess is that you weren't running the Powershell command as an administrator.  (By default, even if you're an admin, you don't run things with admin rights for security).
Why doesn't the domain admin show in the securities properties?

Remove-Item : Cannot remove item C:\Windows\System32\Lock64.dll: Access to the path 'C:\Windows\System32\Lock64.dll'
is denied.
At C:\removalscript\Tricerat v4 Removal Script.ps1:337 char:5
+     Remove-Item $env:windir'\System32\Lock*'
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\Windows\System32\Lock64.dll:FileInfo) [Remove-Item], UnauthorizedA
   ccessException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot remove item C:\Windows\System32\LockScreenContent.dll: Access to the path
'C:\Windows\System32\LockScreenContent.dll' is denied.
At C:\removalscript\Tricerat v4 Removal Script.ps1:337 char:5
+     Remove-Item $env:windir'\System32\Lock*'
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\Windows\Syst...reenContent.dll:FileInfo) [Remove-Item], Unauthoriz
   edAccessException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot remove item C:\Windows\System32\LockScreenContentHost.dll: Access to the path
'C:\Windows\System32\LockScreenContentHost.dll' is denied.
At C:\removalscript\Tricerat v4 Removal Script.ps1:337 char:5
+     Remove-Item $env:windir'\System32\Lock*'
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\Windows\Syst...ContentHost.dll:FileInfo) [Remove-Item], Unauthoriz
   edAccessException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot remove item C:\Windows\System32\LockScreenContentServer.exe: Access to the path
'C:\Windows\System32\LockScreenContentServer.exe' is denied.
At C:\removalscript\Tricerat v4 Removal Script.ps1:337 char:5
+     Remove-Item $env:windir'\System32\Lock*'
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\Windows\Syst...ntentServer.exe:FileInfo) [Remove-Item], Unauthoriz
   edAccessException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Cleanup failed. Manual cleanup required.
PS C:\removalscript>
That's a copy and paste, not a screen shot.  A screen shot would show me the title bar:
User generated imageA picture is worth a thousand words.  A copy and paste only 100.
here you go
User generated image
Ok, so the next question is, does the Domain Admins group belong to the local Administrators group on the computer?  Check in Computer Management.
nope.  How do I add it?

User generated image
I was incorrect.  Domain Admins is there

User generated image
What's the permissions on the files in question (that you're trying to remove)?
see attached

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks