Thursday, January 26, 2012

How to add a Shortcut for all users in a VDI environment via Group Policy Preferences

Jeff Miller was using VMware View 5 with Wyse p20’s and needed the ability for users to disconnect from their desktop rather than just locking their machine and turning off the monitor/device.   He was running into issues specifically with View 5 and the P20s reconnecting back to sessions that were already in a connected state.  (i.e. Users just left the session running and turned off the monitor and headed home hoping to reconnect remotely).

Typically the user would have to attempt several times before establishing a successful connection.  Jeff noticed solid black screens after logging in and quick disconnects from the p20 if it couldn’t display the windows desktop properly.

As a workaround/fix he decided to deploy a disconnect icon to all of his users through Active Directory Group Policy Preferences.  GPPs are pretty powerful and I’ve seen many clients not fully taking advantage of them.  Many of things that were historically placed in a login script can be accomplished elegantly via the GPP interface.

Check out the steps Jeff took to deploy his shortcut via AD GPP.

1. First create a disconnect batch script in your netlogon share (or somewhere else all users can access)

a. The only line you need in the batch file is:  %Systemroot%\system32\tsdiscon.exe

2. Create a group policy object in AD and apply to your target users OU.
clip_image002

3. Jeff selected icon 131 which was a red X, however feel free to select any icon of your choice.  A full listing of icons and their associated number is found at here.

4. You can either run gpupdate /force to test or logoff and log back on.  You should see your shiny new icon on the desktop.  The Group Policy Preference also has the ability to place a shortcut on the Start Menu, Quick Launch or any number of other places.

5. Inform your users that this is the best option to use when finished for the day or finished with their remote connection.  Also make them aware that this will not close anything on their desktop, it will keep all programs and documents open until they connect again.

Thanks go out to Jeff for the detailed instructions and the REDACTED screenshot! Smile

Click Here to Continue Reading >>

Monday, January 23, 2012

2012 : Getting back on track– A peek behind the scenes.

imageThe last 2 months have been pretty quiet from a blog perspective.  Only 2 posts for the past 2 months.  Not good.  WELL below my historic average and personal goals.  Behind the scenes, some things have changed and will continue to change a bit.  Mostly from an advertising perspective,  I will be winding down my individual commitments to advertising vendors and will be showcasing IPM as the exclusive 2012 sponsor. 

Expect to see the same independently written blog posts from actual people in the trenches with some new logos and maybe some new design elements. Smile 

Looking forward to a great 2012!

Click Here to Continue Reading >>

Tuesday, December 27, 2011

Database Permissions in XenDesktop 5–Use SQLCMD mode!

The database requirements for Citrix XenDesktop 5.5 changed a bit from XenDesktop 4 and trying to explain all of these details to your security conscious DBA can be exhausting fruitless aggravating time consuming challenging occasionally.  If you are using the Desktop Studio to initially configure your database, you will need to have the user running the install given Security Admin rights on the database.  Apparently, this is not always as easy as it seems.

After some back and forth conversations with the DBA group, out of desperation, I decided to click the Generate… button.  Problem solved.

image

Clicking Generate outputs a nice and easy SQLCMD script that you can give to your DBA that basically answers all of their questions (thanks to the great commenting in the script) and allows them to set up the database environment  for XenDesktop using their God Mode privileges.  Couldn’t be easier.

If you’ve been struggling coming up with the correct permission requirements for your DBA, give the Generate button a try. Smile

Click Here to Continue Reading >>

Tuesday, December 6, 2011

Reverting iOS applications using Dropbox!

imageSometimes after upgrading an application on an iOS device, new ‘features’ turn into issues and you would like to revert back.  The following instructions by Marcos Velez can be used to revert to a more stable version.

  1. Make sure you still have a previous version (Citrix 4.2.3.ipa, Citrix 5.0.ipa or Citrix 5.0.1.ipa) on your local drive. [More on using Dropbox for that below]
  2. If you can’t find it, look for it in the Recycle Bin (Windows), or Trash (Apple).  As new, updated applications are downloaded from the iTunes App Store, previous versions are usually deleted and moved to the Recycle Bin, or Trash.
  3. Now, delete the new/current version from iTunes (right click on it and choose Delete)
  4. Delete the new/current version from your iPad (press on its icon for three seconds and then click on the red x)
  5. Once you have deleted the new version from both iTunes and your iPad, drag and drop the old version application file onto iTunes.
  6. Sync your device

To prevent relying on the recycle bin or trash, you can set up DropBox to keep all of your .IPAs and prior versions for you.

First, read my post on Dropbox Extensions
(http://www.vmwareinfo.com/2011/01/dropbox-extensions-to-make-your-life.html)

Then add a link for your Mobile Applications folder to Dropbox.  This is usually in C:\Users\<UserName>\Music\iTunes\iTunes Media\Mobile Applications

At this point, all your IPAs will get sucked into Dropbox.  When looking for an older IPA, just log into your Dropbox dashboard and toggle the ‘Show deleted files’ option.  You can then download the IPA and follow Marcos’ helpful steps to restore your application version.

image

Always have your stuff when you need it with @Dropbox. A 2GB account is free!
Join here: http://db.tt/GEbA2dPr

Click Here to Continue Reading >>

Wednesday, November 30, 2011

PowerShell Tutorial – How to Keep Tabs on XenApp Printer Queues

Sam Jacobs posted a great PowerShell script and tutorial on IPM’s corporate blog that I wanted to share with everyone.

A few weeks ago, a client of ours began noticing that printer queues on certain XenApp servers were experiencing errors, and jobs sent to those queues were left stranded and never printed. As it turned out, the problem was caused by an updated printer driver, and the issue only occurred when that printer driver was used.

Since there were quite a few servers involved, with 10-20 print queues per server, it seemed like a job for a WMI script. The first version (a .VBS script) looked something like this:

strServer = "."
strQuery = "SELECT * FROM Win32_PerfFormattedData_Spooler_PrintQueue "

Set
objWMIService = GetObject (“winmgmts:\\” & strServer & “\root\CIMV2″)
Set colItems = objWMIService.ExecQuery (strQuery)

Wscript.Echo “Printer” & vbTab & “Jobs” & vbTab & “JobErrors”
For Each objItem In colItems
WScript.Echo objItem.Name & vbTab & objItem.Jobs & vbTab & objItem.JobErrors
Next

Set
objWMIService = Nothing
Set colItems = Nothing

While the above worked just fine, due to the varying length printer names, the resultant output was a bit difficult to read. Here’s what the output looked like when run on my local machine:

PowerShell to the rescue! In order to get the same output, only a single line is needed to get the same results in PowerShell (while wrapped here for readability, it may all be placed on a single line):

Get-WMIObject Win32_PerfFormattedData_Spooler_PrintQueue -computerName . |
Select Name, Jobs, JobErrors | ft –auto

The command above uses the Get-WMIObject cmdlet to read the print queues of the current server, pipes the output to select the desired fields: Name (printer name), Jobs (Number of Pending Jobs), and JobErrors (Number of Errors), and pipes the output to the Format-Table cmdlet (alias: ft) to automatically give us a nicely formatted table:

Much easier to read!

Now let’s add two additional features. First of all, we need to be able to cycle through the print queues of all our XenApp servers. While this could be done by importing the Active Directory PowerShell module and using some AD cmdlets, it’s pretty easy to just create a file with the names of the XenApp servers. This way, we don’t need to add any additional software to the XA servers.

Since we’re only interested in printers that have errors, it would also be nice to highlight only those printers which have jobs pending (signaling a possible problem).

Here is the PowerShell script with the above features added:

$servers = Get-Content 'CitrixServerList.txt'  
ForEach ($server in $servers) {
try {
write-host "Processing printers for: " $server " ..."
Get-WMIObject Win32_PerfFormattedData_Spooler_PrintQueue
-computerName $server -ea stop |
?{$_.jobs -gt 0} |
Select @{Expression={$_.Name};Label=$server+" printers"},
Jobs, JobErrors |
ft -auto
} catch [System.Exception] {
write-host $server "...cannot retrieve printer names"
}
}



First, we retrieve the list of XenApp servers (with one server per line in the text file).

We then cycle through each server, wrapping the code in a try/catch block to handle errors (in case one of the servers is offline, for example).


The new parts of the script above:



-computerName  $server    the XenApp server name from the ForEach command
-ea stop set the ErrorAction (ea) to stop processing the command if an error occurs
?{$_.jobs -gt 0} only show printer queues with jobs pending


The term @{Expression={$_.Name};Label=$server+” printers”} shows how to rename column headings in the output.



Output of the final version above:






Click Here to Continue Reading >>