Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.