Install RDS with Powershell on local server
<p>I'm pretty new to Powershell and wanted to create a script that install the Remote Desktop Service which is a prerequisite of my application. (I'm on R2012 btw)</p>

<p>I already found that it's possible to do so with a domain account on a remote server (due to the restart needed during installation). I used:</p>

<pre><code>New-RDSessionDeployment [-ConnectionBroker] &lt;String&gt; [-SessionHost] &lt;String[]&gt; [[-WebAccessServer] &lt;String&gt; ]
</code></pre>

<p>Now, I want to install RDS on my local server when I launch my Powershell script (as I can do with the Server Manager GUI). The goal is to install RDS and my application in the same Powershell script without the need to do it using a remote server.</p>

<p>Is it possible to do so ? Should I use the role-based RDS installation or is there any tricks I can use to bypass the local server restart (like maybe a workflow) ?</p>