Configure Guest OS for Microsoft VDI (Windows PowerShell Script)

This script configures the operating system on the virtual machine to work with Remote Desktop Virtualization.

 
 
 
 
 
4.6 Star
(10)
Add to favorites
4/28/2010
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • hi
    1 Posts | Last post August 08, 2012
    • how do execute the CDI portion ?
  • Script logic error
    6 Posts | Last post December 26, 2010
    • When running this script on a Windows XP machine, there is a line of code that calls the Grant-RDPPermissions function within the Configure-XP function is missing the parameter which tells the function that it is XP and should be changed from this:
            $RDVHost | %{Grant-RDPPermissions $_}
      To this:
            $RDVHost | %{Grant-RDPPermissions $_ $TRUE}
      
      If left unchanged, the script uses the wrong WMI namespace for Windows XP.
    • Hi jon, Thank you very much for reporting this. The script is now updated. 
    • I have isntalled Powershell 1.0 and .Net on my Xp boxes, and tried to run this script on them, but it bombs at: 
      
      PS C:\Documents and Settings\admin> c:\rdvscript.ps1
      Unexpected token 'It' in expression or statement.
      At C:\rdvscript.ps1:8 char:14
                1. It  <<<< enables Remote Desktop.
      
      So I removed the section in the script that the first line was referencing as having problems with and ran it again:
      
      PS C:\Documents and Settings\admin> c:\rdvscript.ps1
      Missing closing ')' in expression.
      At C:\rdvscript.ps1:52 char:5
            [ <<<< Parameter(Mandatory=$TRUE, Position=0, HelpMessage="RD Virtualization Host server")]
      PS C:\Documents and Settings\admin>
      
      I must be doing something wrong.  Can someone help?
    • This script uses features that are available with PowerShell v2.0 or higher.
      Hence it will not work properly with PowerShell v1.0.
    • I'm facing the same problem like Kristin on Win7/PowerShell v2 or XP/PowerShell v2
      also with other scripts after "param (" 
      
      Missing closing ')' in expression.
      At C:\Configure-VirtualMachine.ps1:66 char:5
             <<<< [Parameter(Mandatory=$TRUE, Position=0, HelpMessage="RD Virtualization Host server")]
            CategoryInfo          : ParserError: (CloseParenToken:TokenId) [], ParentContainsErrorRecordException
            FullyQualifiedErrorId : MissingEndParenthesisInExpression
      
      If somebody could load the script in PowerShell ISE you can see that there's a mistake because of the different color highlighting after "param ("
      
      
    • If PS says Missing closing ')'... try to use the "Copy code" link at the top right corner instead of select the text with mouse and copying it. It's solved the problem for me. 
  • XP not working on this script
    1 Posts | Last post April 15, 2010
    • Hi,
      
      encountered the same error as reported by Kristin. any suggestion for xp?