locked
Unattend files and Server 2012 R2 RDS RRS feed

  • Question

  • Hi

    I have a vdi implementation (managed, pooled vm's) , which is working fine as long as i don't create a custom unattend file. for exmaple, my desktops need to run some powershell scripts upon first logon, which i use to be able to do in Microsoft-Windows-Shell-Setup under firstlogoncommands, but these scripts don't seem to run with vdi desktops. is there any other way to get these scripts to run before a user logs on for the first time?


    Wednesday, February 12, 2014 10:20 AM

Answers

  • Thanks for the info, but I have now discovered that the script do run successfully. What has been causing the issues is the fact that I can't log onto the virtual desktops after deployment. For example, if I access the rds server via the web interface (rdweb) and connect it tell me that there are no desktops available. So I thought I would look at the individual machines that make up the collection. This revealed to me that every single virtual desktop in the collection has the local administrator logged on, although on the machine's themselves it says "press ctrl-alt-delete to begin".

    I fins this odd. When I try and forcefully logoff the local admin user its says it can't do it. Even if I restart the vm's in Hyper-V the rds broker still flags these machines to unavailable.

    Is this a bug in RDS 2012 R2?

    Friday, February 14, 2014 5:41 AM

All replies

  • Hi,

    Thanks for your posting in Windows Server Forum.

    For your case, have you try to enable GPO setting for applying logon script on first logon? 

    You can able to view the option of GPO setting “Run Windows PowerShell scripts first at user logon, logoff” or “Run Windows PowerShell scripts first at computer startup, shutdown” under below mention path.

    Computer Configuration\Policies\Administrative Templates\System\Scripts\
    User Configuration\Policies\Administrative Templates\System\Scripts\

    Note: If applied for computer & User configuration both, then Computer configuration will take precedence over user configuration.

    More information:
    Windows PowerShell Cmdlets for Group Policy

    Apart from this, there is another article for reference.
    4 Ways to Use PowerShell for Server Logon Scripts


    Hope it helps!

    Thanks,
    Dharmesh
    Friday, February 14, 2014 3:33 AM
  • Thanks for the info, but I have now discovered that the script do run successfully. What has been causing the issues is the fact that I can't log onto the virtual desktops after deployment. For example, if I access the rds server via the web interface (rdweb) and connect it tell me that there are no desktops available. So I thought I would look at the individual machines that make up the collection. This revealed to me that every single virtual desktop in the collection has the local administrator logged on, although on the machine's themselves it says "press ctrl-alt-delete to begin".

    I fins this odd. When I try and forcefully logoff the local admin user its says it can't do it. Even if I restart the vm's in Hyper-V the rds broker still flags these machines to unavailable.

    Is this a bug in RDS 2012 R2?

    Friday, February 14, 2014 5:41 AM