0

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.

  • Why do you want to do it specifically with Powershell? Are you open to alternative methods, such as logon scripts? – John Gardeniers Mar 01 '11 at 07: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 01 '11 at 07: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 01 '11 at 10:30

2 Answers2

1

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.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
1

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.

RWHIRN
  • 11
  • 1