Do you want to script RDS for VDI
If so the Technet Script Center has plenty of resources, view them here
Some scripts I’d like to highlight:
Virtual Machine Management
Configure Guest OS for VDI (PowerShell)
Configure Guest OS for VDI (VB Script)
Virtual machine assignment management
Bulk assign virtual machines to users or pools
List VM assignment information
Infrastructure setup: RD Connection Broker cluster creation and management
Manage RD Connection Broker cluster (create, add nodes)
Update RD Connection Broker configuration across nodes in a cluster
Troubleshooting
Monitoring and Reporting: