1

On a standalone machine I can query the local policy using gpresult and specifying the desired user account like so:

gpresult /USER username /h C:\report.html

How could I do the same thing, but for the default user template (i.e. the profile copied when creating a new user on the machine)?

Thanks!

1 Answer 1

1

You can't. gpresult needs a valid user context that actually exists to query. You can't tell it to query ~"whatever a default user would be," least of all because that doesn't actually make sense. There isn't a "null" or default user. Both using the computer and applying policy (in Windows) always have a user context, even if that user isn't an actual user, but is SYSTEM, for example. So speaking of a "default" user, or a non-existent user is somewhat nonsensical. (Really, what is the "default" user? There are a number of users created by default on a Windows machine, and they're all very different.)

And, in fact, gpresult will default to the logged on user running the query if the user argument is not provided.

You can create a new user, accept the... "defaults" (to the extent that there are any) and query against that user, which seems like the easiest way to handle this.

1
  • Thanks, although it proves I can't do what I was trying to do, it's a pretty comprehensive answer!
    – Earl Sven
    Aug 24, 2012 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .