Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Terminal Services without Active Directory on Windows Server 2008. How can I set the startup program for a user via Powershell?

Since I don't have the Active Directory role installed, it seems that I am missing get-qaduser. Therefore, I can't just lookup the user and set the "TsInitialProgram" property.

share|improve this question
Why do you want to do it specifically with Powershell? Are you open to alternative methods, such as logon scripts? – John Gardeniers Mar 1 '11 at 7:51
I'm not attached to Powershell. Would the login script approach have the same effect? --- that is, would the specified program be the only program in the session? – Todd Schiller Mar 1 '11 at 7:55
I can't answer that but by opening your options you increase the chancese of getting useful answers from those who do know. I'd suggest you remove Powershell from at least the title, as that may be limiting your audience a bit. – John Gardeniers Mar 1 '11 at 10:30
up vote 1 down vote accepted

The local user database is somewhat more limited in scope than a full AD environment. Many of the attributes available for use on an AD user are not available on a local user, and unfortunately, ms-TS-Initial-Program is one of those.

share|improve this answer

Not entirely true. Initial Program is stored for all Local Users just like in AD. I have 30 users setup with an initial program. It starts when they login via remote desktop. If you do a dump of $user in PS you see a property called "Parameters" and in there you can see "Initial Program" but the values for all the "parameters" are encrypted. So its there, just don't know how to change it with PS.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.