Thank you to all attendees for joining the PowerShell TechTalk webinar! I hope that you were able to learn some things from it that will make your life easier. This blog post will wrap up some of the questions that were asked during the presentation.
First off, there were requests for the scripts demoed in the session – the link to these is provided below. Don’t forget to also go to the XenApp and XenDesktop code-shares to get more premade scripts and applications!
Additionally, check the Q&A from a previous similar webinar for additional questions, scripts and answers.
Q: Where can I get the PowerGUI program, and how much is it?
A: PowerGUI can be found at PowerGUI.org, and is a free PowerShell editor with a built in shell, autocomplete, debug environment, and other features that greatly assist in writing and debugging scripts.
Q: Which versions of XenApp can use PowerShell?
A: XenApp 4.5 with HRP3 or higher, XenApp 5, and XenApp 6 all have PowerShell SDKs. 4.5HRP3 and 5 are technically in tech preview mode, and 6 is fully supported. Personal experience has not found any issues in the tech preview, and most scripts will behave almost identically between a tech preview and the XenApp 6 SDK environment.
Q: Can you use the PowerShell SDK to install roles?
A: I do not believe this is currently within the scope of the SDKs capabilities.
Q: Can you use PowerShell to configure the web interface and CSG?
A: Currently, I do not believe this is possible directly. However, you may be able to edit some of the configuration files using PowerShell to modify how a Web Interface or CSG works.
Q: Any advice on converting from MFCOM to PowerShell?
A: Citrix has provided and MFCOM to PowerShell search utility (http://support.citrix.com/article/CTX125089) which can help in conversions. Additionally, you can check out this blog post (http://community.citrix.com/display/ocb/2008/07/25/PowerShell+and+MFCOM+-+Let%27s+get+started) on how to use PowerShell to manage MFCOM objects if you don’t want to jump directly to PS, and there’s also a PowerGUI MFCOM PowerPack (http://dmitrysotnikov.wordpress.com/2008/08/12/citrix-presentation-server-xenapp-powerpack/) to help admins out.
Q: Are changes made to a Citrix farm via PowerShell logged via configuration logging?
A: [Still being confirmed]
Q: Is it possible to publish applications via PowerShell?
A: Almost anything that can be done via the management console can also be done via PowerShell. Publishing applications can be done with the following bare-minimum code (additional parameters can be added to change the default settings):
New-XAApplication -BrowserName “Temporary Application 2” -DisplayName “Temporary Application 2” -Accounts “Domain Users@CITRITE” -CommandLineExecutable “C:\Windows\system32\gpedit.msc” -ApplicationType “ServerInstalled” -ServerNames “CCSXA601”
Q: Can I use a batch file to start a PowerShell script?
A: Yes, you can use the command “powershell c:\folder\nameoffile.ps1” to run the script.
Q: Can I use Windows Scheduler to run PowerShell scripts?
A: Yes, just use Windows Scheduler as you would normally do, and in the command line section for what to run, use “powershell c:\folder\nameoffile.ps1”
Q: Are there any plans to expose more of the PowerShell functionality in the XD consoles?
A: Currently, the Desktop Director in XenDesktop 5 exposes the PowerShell commands. It is possible that other consoles will do this in the future, though I’m not aware of this being stated in the road map.
Q: Is it possible to get the enumerations for a parameter such as “ColorDepth”?
A: There are a few ways to do this. Occasionally, you can find this listed in the documentation about the command, ie
Get-Help This-Command -Detailed
Alternately, you can get the property of an existing application, desktop or server with that setting already, or you can run a PowerShell command with an illegal property. Such a command will generally fail and return an error with all of the allowed values.
Q: Are there any plans to have EcoShell support for XenApp/XenDesktop?
A: This question should be directed towards EcoShell, as the support decision will rely on them. As EcoShell is built on PowerGUI and PowerShell, all the tools necessary for support are available to them.
Q: Is there a PS script available that can export/import all XenApp/XenDesktop settings?
A: I have not seen a full backup script yet, though one is definitely possible, and should be fairly simple to create.
Q: Does PowerShell enable more or less access to XenApp info than using C# and MFCOM?
A: There may be some slight differences between data, but for the most part PowerShell should provide as much or more information as MFCOM
Q: How much like PHP is Powershell?
A: There are some influences in style, syntax and behavior, just as there are some influences from ASP.net, but this is essentially where the similarities end.
Q: Can the results of the scripts create an event to EdgeSight?
A: Simply put, yes, though you may have to get a bit creative: PowerShell can create event log entries that will then be captured by EdgeSight – check this post on PowerShell Event-Log entires for more info. It may also be possible to capture SNMP traps as well, though I have not tested this yet.