Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

PSDrives in SCCM tasksequence

$
0
0

Can anyone think of a reason why a PSDrive would not work in an SCCM(MDT) tasksequence?

In a TS for 2008 R2 I am trying to run a PS script to configure some RDS Host settings. This involves:

Import-Module RemoteDesktopServices

Which imports with no errors, show up in the list of loaded modules.

Now in Windows when you load this module it automatically creates a PSDrive called'RDS:\' which is a tree of the RDS settings. This RDS drive never gets created as part of the TS for some reason.

Even trying to manually create it with:

New-PSDrive -Name RDS -PSProvider RemoteDesktopServices -Root "RDS:\"

Doesn't create it either, no error though, running 'Get-PSDrive' shows that the drive is not available.

It's frustrating the hell out of me.  I'm trying to automate the process for new / replacement RDS hosts in a farm, the script works perfectly from within Windows.

Thanks in advance for any help!


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>