# Powershell Resource - New-RDSessionDeployment

**URL:** <https://discourse.chef.io/t/powershell-resource-new-rdsessiondeployment/14768>\
**Category:** Chef Infra (archive)\
**Created:** [March 20, 2019, 10:50am UTC](https://discourse.chef.io/t/powershell-resource-new-rdsessiondeployment/14768 "2019-03-20T10:50:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![csimosullivan](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@csimosullivan](https://discourse.chef.io/u/csimosullivan)\
**Post date:** [March 20, 2019, 10:50am UTC](https://discourse.chef.io/t/powershell-resource-new-rdsessiondeployment/14768/1 "2019-03-20T10:50:29Z")

</div>

Hi,

Fairly new and having an issue with getting a Powershell resource to run.

I am trying to automate installing RDS on a windows 2016 server. I have a seperate recipe that installs the RDS features which works great and then I have another that is supposed to create the deployment which I have the issue with.

The powershell command works fine when run locally on the node and I can see the script is correct when it is created on the node, but nothing seems to happen. The recipe just runs without error and that's it.

RECIPE:

# 

# Cookbook:: blahblah

# Recipe:: Deployment

# 

# Copyright:: 2019, The Authors, All Rights Reserved.

return unless node['platform'] == 'windows'

powershell\_script 'New\_SessionDeployment' do  
code \<\<-EOH  
New-RDSessionDeployment -WebAccessServer "vagrant.test.local" -SessionHost "vagrant.test.local" -ConnectionBroker "vagrant.test.local"  
EOH  
guard\_interpreter :powershell\_script  
end

CHEF-CLIENT OUTPUT

```
   Recipe: blahblah::Deployment
     * powershell_script[New_SessionDeployment] action run
       - execute "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/vagrant/AppData/Local/Temp/chef-scri-3428-1l661pd.ps1"

   Running handlers:
   Running handlers complete
   Chef Client finished, 1/1 resources updated in 22 seconds

```

I've tried running as a different account and elevated but no joy. Can anyone help?
