Get App-V 5.0 Command Line Hook Switch with PowerShell

The App-V 5.0 Command Line Hook Switch can be used to allow local applications to run inside an App-V Virtual Environment. This way packaged applications, such as a sequenced browser plug-in, can interact with locally installed applications, such as Internet Explorer.

Assembling the Command Line Hook Switch can be tricky because it requires you to retrieve the package GUID and version GUID and concatenate them with an underscore in between. The full format looks like this: /appvve:<PACKAGEGUID_VERSIONGUID>.

To do this quickly, you can copy and run this single line of Powershell code:

$AppName = Read-Host "Enter package name"; If($AppVClientPackage = Get-AppVClientPackage $AppName) { Write-Host ("App-V Command Line Hook Switch:`n/appvve:" + $AppVClientPackage.PackageId + "_" + $AppVClientPackage.VersionId) } Else { Write-Host "Package not found." }


Result


Powershell Script to assemble the App-V Command Line Hook Switch

Copy the last line of the output and add it as a parameter to your application shortcut.

For more information about the App-V Command Line Hook Switch see the following article: How to launch processes inside the App-V 5.0 virtualized environment (KB2848278)

New Tab Page in Internet Explorer displays Black Background

Symptoms

  • The page for a new tab ("Frequent") displays a black background.
  • On a server you might experience group policy settings related to internet security zones not being applied correctly.
  • Zone icons might be displayed with a lock icon in front (prior to Internet Explorer 11).

Internet Explorer New Tab Black Background

Cause

I discovered the cause on our Remote Desktop Server / Citrix XenApp 6.5 environment was that the (mandatory) profile was missing theme related registry settings. This profile was created by copying the default user profile or a new user without enabling a theme for this user first.

Solution

The solution was to configure a Windows Aero / Basic theme for the template user before copying or converting it into a mandatory profile.

Internet Explorer New Tab Regular Background Color

References

Other suggested solutions include:
  • Add the missing registry keys related to the Windows theme manually, through a logon script or Group Policy Preferences. [1]
  • Change to and fro a different theme. [2]
  • Reset Internet Explorer settings to defaults.
  • Disable Internet Explorer Enhanced Security Configuration (IE ESC) before installing the Desktop Experience Feature of Remote Desktop Services.

Set Mailbox Type to Room, Equipment or Shared in Exchange based on Name with Powershell

Besides regular mailboxes Exchange has the option of flagging mailboxes as a Room or Equipment mailbox. These so called Resource mailboxes can be added to an appointment by which users can use Outlook as a reservation system for conference rooms and video projectors.

To convert regular mailboxes that are used in this manner in an existing environment to Resource mailboxes can be time-consuming. Therefore I wrote a PowerShell script that sets the flag based on the occurence of certain words in the name of the mailbox. This script asumes your shared/resource mailboxes are in their own organizational unit.

Shared mailboxes have the added benefit of not requiring a license in Office 365 as they are represented by a disabled user account. One of the conditions however is that their size remains below 10 gigabytes and it is not possible to use ActiveSync with such accounts.

On to the script. First enable remote PowerShell to your Exchange server for the script session.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchange Server>/PowerShell/ -Authentication Kerberos
Import-PSSession $Session

Next declare this simple function to search the name for the occurence of a list of search terms.

function inArray([String]$searchTerm, [Array]$searchArray) {
    ForEach($term in $searchArray) {
        if ($searchTerm -match $term) {
            return $true
        }
    }
    return $false
}

Define the search terms (substrings that are part of the mailbox name) that would define it as a Room or Equipment mailbox.

In this case the terms are in Dutch, but you can replace these with for example: "room", "office", "floor" and so on.

$roomSearchTerms = "ruimte", "kamer", "zaal", "kantoor", "lokaal", "cabine"
$equipmentSearchTerms = "projector", "beamer", "laptop"

Define the OU wherein your shared mailboxes reside.

$organizationalUnit = "OU=Mail,OU=Groups,DC=domain,DC=local"

Finally the query and operations for each mailbox happen here.

$mailboxes = Get-Mailbox -OrganizationalUnit $organizationalUnit -ResultSize Unlimited

ForEach ($mailbox in $mailboxes) {
    if (inArray ($mailbox.Name) $roomSearchTerms) {
        Set-Mailbox -Identity $mailbox.WindowsEmailAddress -Type Room
    } elseif (inArray ($mailbox.Name) $equipmentSearchTerms) {
        Set-Mailbox -Identity $mailbox.WindowsEmailAddress -Type Equipment
    } else {
        Set-Mailbox -Identity $mailbox.WindowsEmailAddress -Type Shared
    }
}

The end result in the Address Book after running the script looks something like this:

Outlook 2013 All Rooms
Great succes! Modify and use at your own risk.

Download the script: setResourceMailboxes.ps1

[Fixed] Error Adding Microsoft App-V 5.0 SP2 packages to RES Workspace Manager 2012 SR4

Adding App-V packages that were sequenced in Microsoft App-V 5.0 SP2 into RES Workspace Manager 2012 SR4 (9.7.4.0) results in the following error messages being displayed:

An Error occured during the execution of a procedure.
Contact your administrator or helpdesk with the following info:
Prog: pwrtech.exe
Procedure: sharedPF8.fysnHasChildNodes
Error: (91) Object variable or With block variable not set
Machine: <machine name>
Program will resume normal operation...

This App-V package contains no shortcuts
for RES Workspace Manager to import.

This is a known issue with RES Workspace Manager 2012 SR4. RES is currently working on a fix.

Update 02-01-2014: This bug has been resolved in RES Workspace Manager 2012 SR4 Revision 3 (9.7.4.3), available upon customer request at RES Software. From the release notes:

"Microsoft App-V 5: Packages sequenced with Microsoft App-V 5 SP2 could not be imported in Console
Microsoft App-V 5.0 packages that were sequenced with Microsoft App-V 5 SP2 could not be imported in the RES Workspace Manager Console. This was caused by a change in the layout of Microsoft App-V 5 packages. When importing such packages (at Composition > Applications), the following error was displayed:

"Error (91) Object variable or With block variable not set" 

This has been resolved."

Workaround for those unable upgrade at this time

Packages that benefit from the added features of App-V 5.0 SP2, such as Internet Explorer plug-ins Java and Flash can be published (globally) to the client as they contain no shortcuts and require no interaction with RES Workspace Manager.
However, if you require a shortcut/application that has to be managed by RES Workspace Manager you should sequence the packages in App-V 5.0 SP1 or earlier versions. This means an application such as Adobe Reader which contains both a browser plug-in and an application may require two seperate packages. Alternatively you could to allow the App-V client to manage the shortcuts.

Fix: "The remote session was disconnected because there are no Terminal Server License Servers available to provide a license."

Problem

In a Citrix XenApp environment the following error is displayed, even though Terminal Server License Servers and appropriate licenses are available:
"The remote session was disconnected because there are no Terminal Server License Servers
available to provide a license.
Please contact the server administrator."

Solution

Remove the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\Store

Warning: applying this .reg file will remove data from your registry. Please make sure you have a back-up.

NetApp: invalid format in the /etc/rc file

The following error is displayed in NetApp OnCommand System Manager:

"Invalid format in the /etc/rc file
Active operations on network interfaces are disabled as the /etc/rc file does not adhere to the expected format. Modify the /etc/rc manually to enable the active operations."

Invalid format in the /etc/rc file
The contents of /etc/rc were as follows:

#Auto-generated by setup Wed Nov 28 09:46:28 CET 2012
ifgrp create single svif e1a e0a
ifconfig svif `hostname`-svif partner svif mtusize 1500
ifconfig e0M `hostname`-e0M partner e0M mtusize 1500
route add default 192.168.1.254 1
routed on
options dns.domainname toaster.lan
options dns.enable on
options nis.enable off
ifgrp favor e1a
savecore

The correct sequence of the commands is:
  1. hostname
  2. vif / ifgrp
  3. vlan
  4. ifconfig
  5. vfiler
  6. route
  7. routed
  8. options
  9. savecore

The command ifgrp favor e1a is out of sequence and needs to be moved up.

You can manually edit /etc/rc through the administrative share \\toaster\c$ and a text editor.

#Auto-generated by setup Wed Nov 28 09:46:28 CET 2012
ifgrp create single svif e1a e0a
ifgrp favor e1a
ifconfig svif `hostname`-svif partner svif mtusize 1500
ifconfig e0M `hostname`-e0M partner e0M mtusize 1500
route add default 192.168.1.254 1
routed on
options dns.domainname toaster.lan
options dns.enable on
options nis.enable off
savecore

Installing Citrix XenServer 6.2 from a USB drive

Below is a quick and easy method to create a bootable XenServer USB drive from Windows.

  1. Download the XenServer 6.2 ISO.
  2. Download and run Universal USB Installer.
  3. Select "Try Unlisted Linux ISO".
  4. Browse to your XenServer ISO.
  5. Select your USB Flash Drive Letter.
  6. (Optional) If your drive is not yet FAT32 formatted check "Format X:\ Drive (Erases Contents)".

Universal USB Installer
  1. Click Create.
  2. Enjoy...
Citrix XenServer Setup
 
Copyright Dave Thijssen. Powered by Blogger.