• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Ulrik Christensen

  • Press
  • Contact

Archives for August 2019

How to renew RDS grace period on RDS hosts

August 31, 2019 by Ulrik Christensen 6 Comments

This guide will show you how to renew RDS grace period on your hosts. Microsoft gives you 120 days grace period on RDS. I would say that it would be enough to run a pilot or a PoC. I would only encourage everyone to purchase licenses for your environment and only use this article as a last option.

To renew RDS grace period, you need to find the following registry key and delete it.

“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\
Terminal Server\RCM\GracePeriod”

Before you can delete the registry key, you need to change ownership. You can do that by following these steps:

  1. Right-Click on the key.
  2. Click on “Permissions”.
  3. Click on “Advanced”.
  4. Click on “Owner”.
  5. Select “Administrators”.
  6. Click on “Apply”

You can now delete the key. Reboot the server and you now have a new grace period.

Filed Under: Citrix Apps and Desktops

Enable Outlook Cache and Outlook Search in Citrix Apps and Desktops

August 21, 2019 by Ulrik Christensen 2 Comments

Ever since Microsoft introduced Office 365, it has been a challenge to deliver Outlook from a terminal server-based solution. The reason is that you get the best user experience when you cache all your emails in an OST-file, which is created locally on the machine. When the user accesses Outlook the next day, he or she might end up on a different server. This means that the OST-file needs to be created once again and that will take a long time and take up a lot of space. The solution is to enable Outlook cache using Citrix Profile Management.

How do I enable Outlook cache?

If you already have Profile Management configured, the change you need to do is very simple. Edit your profile policy and go to this path in the policy editor:

Computer Configuration\Policies\Administrative Templates\Citrix Components\Profile Management\Advanced Settings\

Find the policy “Enable search index roaming for Outlook” and set to “Enabled”.

Once that is done, a VHD file is created in each user’s profile storage folder, as shown in in the graphics below. This file will contain an offline copy of the user’s mailbox and search index.

Outlook cache

All you need to do now is to reboot your VDAs. Do not forget to check if you have the necessary disk space on your file server that hosts your user profiles.

Filed Under: Citrix Apps and Desktops

How to solve This copy of Microsoft Office cannot be used

August 18, 2019 by Ulrik Christensen 6 Comments

If you are using Office 365 on your Citrix Apps and Desktop workloads, you have probably run into this error. It says, “This copy of Microsoft Office cannot be used on a computer running terminal services.” I have seen this error even though I have used Office Deployment Tool and created a configuration.xml file for the roll-out.

this copy of microsoft office cannot be used on a computer running terminal services

The Solution to This copy of Microsoft Office cannot be used on a computer running terminal services

The reason why you get this error is that you are missing a key in registry.

Go to this path in registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun
\Configuration

And add the following key:

SharedComputerLicensing: value 1

You need to do this on each VDA or in your image.

Once that is done, you need to set policy as well. For that, you need the latest Administrative Template Files for Microsoft Office. If you do not already have them, you can download here: https://www.microsoft.com/en-us/download/details.aspx?id=49030.

When the Administrative Template Files are implemented, create a new policy. Navigate to this path in the policy editor.

Computer Configuration\Policies\Administrative Templates\Microsoft Office 2016 (Machine)\Licensing Settings.

Enable the policy named “Use named computer activation”.

Link the policy to an OU so it will apply to the VDAs. After that, you need to reboot your VDA’s so the policy will apply.

 

 

 

 

Filed Under: Citrix Apps and Desktops

Redis and Memorystore as a session handler in App Engine

August 3, 2019 by Ulrik Christensen Leave a Comment

If you plan to run your web application in Google Cloud using App Engine, there was one thing that I had to solve before I could launch. That was how to share my sessions across my instances in App Engine. I created a login function based on PHP and MySQL and my user information can be used on multiple pages by using sessions. The problem is when I request something from the other instance in App Engine, the session doesn’t exist. The solution was to set up Redis and Memorystore as a session handler in App Engine in Google Cloud.

Google’s documentation suggests solving this issue with Cloud SQL. In this article, I will show you how to solve it with Redis and Memorystore. The reason why I have chosen Redis is that it works with PHP right out of the box.

Using Redis as a session handler in App Engine

One way to get around solving sessions across instances in App Engine is to install at Redis database server as a compute engine. You simply spin up a Linux instance and install Redis. Here is a guide on how to do that.

Connect to your instance via SSH and type in these commands.

sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt update
sudo apt install redis-server

This will install Redis on to your Linux instance.

Test your installation by typing the following command:

redis-cli ping

This will give you a PONG response.

Now you need to allow connections to the Redis server. By default, it only accepts connection from localhost. You need to bind the IP that your web app is going to communicate with. To do that you need to modify the Redis configuration file. Type in this command to open the configuration file.

sudo vi /etc/redis/redis.conf

Look for this line.

bind localhost

Add your IP at the end so it looks like this:

bind localhost xxx.xxx.xxx.xxx

Save the file and exit.

You also need to set a password. Open the same file again and look for this line:

requirepass

Modify the line by adding your password at the end so it looks like this:

requirepass yoursupersecretpassword

Save the file and exit.

Restart the Redis service with this command:

sudo service redis-server restart

You can test your Redis installation with the following commands.

Connect to the Redis service
redis-cli -h xxx.xxx.xxx.xxx

Authenticate to the Redis Service
AUTH yoursupersecretpassword

check for keys
keys *

Right now, you do not have any keys, because you have not configured your web app to use Redis. To do that you need to do three things.

1. Create a php.ini file and put it in your web application’s root folder. In the php.ini file, you need to add the following lines:

extension=redis.so
session.save_handler = redis
session.save_path = "tcp://xxx.xxx.xxx.xxx:6379?auth=yoursupersecretpassword"

2. Create a firewall rule that allows traffic on TCP port 6379 to your Redis server.
3. Add the network, where your Redis server is located, to your app.yaml file.

You need to add this to your YAML file:

network:
   name: YOUR_NETWORK_NAME
   subnetwork_name: YOUR_SUBNET
   session_affinity: true

Using Memorystore as a session handler in App Engine

session handler in App Engine
Creating a Memorystore instance

Google Cloud comes with a session handler right out of the box. It is called Memorystore. Memorystore creates a Redis instance for you do not need to do any configuration at all. You can find the Memorystore in the menu in the Google Cloud Console under Storage. The first time you access Memorystore, the Redis API is will be enabled for you. Once that is done, you will be able to create your Redis instance.

When you create an instance, you need to configure the following:

  • Instance ID
  • Location
  • Authorized network

You also need to configure the authorized network in your YAML file for your web application. Otherwise, they won’t be able to communicate. Add this to your YAML file:

network:
   name: YOUR_NETWORK_NAME
   subnetwork_name: YOUR_SUBNET
   session_affinity: true

You also need to create a php.ini file in your web application’s root folder with the following lines:

extension=redis.so
session.save_handler = redis
session.save_path = "tcp://xxx.xxx.xxx.xxx:6379"

Put in your Memorystore instance’s IP address instead of xxx.xxx.xxx.xxx

Once that is done, you are ready to go.

Conclusion

There are two ways to deal with session handler in App Engine. The easiest way is to use the Memorystore solution in Google Cloud. It takes the least effort and it is very easy to set up and get it to work.

Filed Under: Google Cloud

Primary Sidebar

Search

About Me

Ulrik Christensen

Building awesome solutions in the cloud and working on how to help cancer patients.

Get the latest news

I use Grammarly when I write content for this site. Try it for free.

Free & Quick Proofreading from Grammarly!

Secondary Sidebar

Achives

  • September 2020
  • August 2020
  • July 2020
  • November 2019
  • September 2019
  • August 2019
  • May 2019
  • April 2019
  • February 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • April 2018
  • March 2018
  • February 2018
  • December 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • February 2017
  • January 2017
  • December 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016

Footer

Recent Posts

  • How to choose between PVS and MCS for image management
  • Autoscale your Citrix Apps and Desktops Workloads in the Cloud
  • Is VPN more secure than a Remote Desktop solution?
  • Mouse for iPad | Unleash the potential of your iPad with Citrix X1 Mouse
  • How to renew RDS grace period on RDS hosts

About

On this website, I will share all my findings so I can find them again. Feel free to look through the blog and contact me if you have any questions by using the contact page.

Get Social

  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Copyright © 2021 · Ulrik Christensen · All rights reserved.