RDS-O-Matic for Windows. It is ready!

It is show time people. Just want to show you the native RDS-O-Matic Win32 app. I had time to port if from the Excel spreadsheet idea and it is not only small but works like a champ.

I know Alex (Twitter @E2EVC) will be complaining about its GUI but hey, for a tool that is this simple there is no need for a fancy GUI. People want apps that work and are simple to use. That is the bottom line and this is what you get with RDS-O-Matic.

So here you have it, on all its glory.

Just want to remind you guys one more time that RDS-O-Matic will be officially released at PubForum (E2EVC) Dublin, in June 2016.

Cheers.

CR

 

14,328 total views, 1 views today

XenApp Reboot Script

As many customers are still running XenApp 6.5, probably one of the most stable/successful XenApp releases, when time comes to reboot the servers on the farm the options available are quite limited.

After looking for some scripts I ended up finding the one fellow CTP Dane Young wrote and posted on his site. The problem IMHO it is overkill for many customers (what ends up making it complex, especially for people not very familiar with PowerShell).

I took his script as a starting point and created a much simpler version that works very well and does what most administrators need:

– Reboots the farm in groups of servers.
– Prevents new logons to the servers that will be rebooted.
– Sends messages to the users 15, 10 and 5 minutes before the reboot will happen.
– Reboots the servers, not waiting for the servers to be completely drained. To be honest I prefer this approach as if you need to wait until a server has no more users you may have to wait days in certain cases.
– Every interaction is logged to the event log (disabling logons, sending messages to users, servers being rebooted, etc).

In this example, the need was to reboot the farm in two passes. One covering half of the servers and another for the remaining servers, 30 minutes later. For this particular case the farm had to be rebooted twice a week. So this is what we did, preparation wise:

– Created four worker groups named TuesdaysRebootGroup1, TuesdaysRebootGroup2, FridaysRebootGroup1 and FridaysRebootGroup2.
– Added half of the servers to TuesdaysRebootGroup1 and the remaining servers to TuesdaysRebootGroup2. Did the exact same thing for the FridaysRebootGroup1 and FridaysRebootGroup2 worker groups.
– On the ZDCs (two of them), we created two scheduled tasks on each of them. On the first ZDC the two tasks are scheduled to run on Tuesdays and Fridays at 1:00am and on the second ZDC the tasks run on Tuesdays and Fridays at 1:30am. The tasks on the first ZDC take care of rebooting the servers on Group1 and the ones on the second ZDC take care of rebooting the servers on Group2.

Here you have the script:

#### BEGINNING

#———————————————————————————–
#———————————————————————————–
# Reboot script for XenApp 6.5 Citrix Farms
# Simply disables new logons and issues warning messages every 5 minutes
# for 15 minutes in total.
# This script can be run as a schedule task from the Zone Data Collector to process
# reboots for all other application servers
# Created by Cláudio Rodrigues, Citrix CTP, Microsoft MVP, VMware vExpert
# WTSLabs Inc. Copyright 2010, 2011, 2012, 2013
# http://blog.wtslabs.com
# Loosely based on the work by Dane Young, Citrix CTP
# Check http://blog.itvce.com/?p=79 for more information
# Build 2014.11.24 Revision 6
#———————————————————————————–
#———————————————————————————–

Add-PSSnapin “Citrix.Xenapp.Commands” -ErrorAction SilentlyContinue

# Define which worker group should be processed.
# We are using one script per worker group so make copies and change the worker groups as needed.
# Can be easily modified to allow multiple worker groups (see Dane’s script)
$Global:WORKERGROUP = “TestCR”
$Global:EventLog = New-Object -type System.Diagnostics.Eventlog -argumentlist Application
$Global:EventLog.Source = “Citrix Reboot Script”
$EventLog.WriteEntry(“Starting scheduled task Citrix Reboot Script.”,”Information”,”111″) # Create test event entry to note the start time of the script

$Step1 =
{
param ([string]$server)

$Global:EventLog = New-Object -type System.Diagnostics.Eventlog -argumentlist Application
$Global:EventLog.Source = “Citrix Reboot Script”

function DisableLogons
{
# Prohibits logons until next restart for server passed as variable 0
set-XAServerLogOnMode -ServerName $args[0] -LogOnMode ProhibitNewLogOnsUntilRestart
Write-Host “Disabling Logons on $server” -foregroundcolor Blue
}

DisableLogons $server
$EventLog.WriteEntry(“Disabled logons until next reboot on ” + $server + “.”,”Information”,”411″)

$sessions = Get-XASession | ? {($_.servername -eq $server -and $_.state -eq “Active”)}
foreach ($session in $sessions)
{
$username = $session.Accountname
Write-Host “Sending message to user $username on $server” -foregroundcolor Blue
Send-XASessionMessage -servername $server -MessageTitle “Server maintenance” -Messagebody “Server will be rebooted in 15 minutes” -sessionID $session.sessionid -MessageboxIcon “error”
}
$EventLog.WriteEntry(“Fifteen (15) minutes warning on server ” + $server + “.”,”Information”,”311″)

}

$Step2 =
{
param ([string]$server)

$Global:EventLog = New-Object -type System.Diagnostics.Eventlog -argumentlist Application
$Global:EventLog.Source = “Citrix Reboot Script”

$sessions = Get-XASession | ? {($_.servername -eq $server -and $_.state -eq “Active”)}
foreach ($session in $sessions)
{
$username = $session.AccountName
Write-Host “Sending message to user $username on $server” -foregroundcolor Green
Send-XASessionMessage -servername $server -MessageTitle “Server maintenance” -Messagebody “Server will be rebooted in 10 minutes” -sessionID $session.sessionid -MessageboxIcon “error”
}
$EventLog.WriteEntry(“Ten (10) minutes warning on server ” + $server + “.”,”Information”,”311″)

}

$Step3 =
{
param ([string]$server)

$Global:EventLog = New-Object -type System.Diagnostics.Eventlog -argumentlist Application
$Global:EventLog.Source = “Citrix Reboot Script”

$sessions = Get-XASession | ? {($_.servername -eq $server -and $_.state -eq “Active”)}
foreach ($session in $sessions)
{
$username = $session.AccountName
Write-Host “Sending message to user $username on $server” -foregroundcolor Yellow
Send-XASessionMessage -servername $server -MessageTitle “Server maintenance” -Messagebody “Server will be rebooted in 5 minutes. SAVE your work” -sessionID $session.sessionid -MessageboxIcon “error”

}
$EventLog.WriteEntry(“Five (5) minutes warning on server ” + $server + “.”,”Information”,”311″)

}

$RebootServer =
{
param ([string]$server)

$Global:EventLog = New-Object -type System.Diagnostics.Eventlog -argumentlist Application
$Global:EventLog.Source = “Citrix Reboot Script”

function StartReboot
{
# Creates a variable named server from the first passed variable
$server = “$args”
# Initiates shutdown on remote server
Invoke-Expression “Shutdown.exe /m $server /r /t 0 /c “”Shutdown scheduled by Citrix Reboot Script.”””
$EventLog.WriteEntry(“Initiating reboot process on ” + $server + “.”,”Information”,”911″)
Start-Sleep -s 120
}

StartReboot $server
}
# Main Script
$workergroup = $GLOBAL:WORKERGROUP
$workergroupservers = @(get-xaworkergroupserver -workergroupname $workergroup | sort-object -property ServerName)
foreach ($workergroupserver in $workergroupservers)
{
$server = $workergroupserver.ServerName
Write-Host “Step1 on $server” -foregroundcolor Blue

$EventLog.WriteEntry(“Processing server ‘” + $server + “‘ from worker group ‘” + $workergroup + “‘.”,”Information”,”211″)
Invoke-Command -ScriptBlock $Step1 -ArgumentList $server
}

Start-Sleep -s 300

foreach ($workergroupserver in $workergroupservers)
{
$server = $workergroupserver.ServerName
Write-Host “Step2 on $server” -foregroundcolor Green

Invoke-Command -ScriptBlock $Step2 -ArgumentList $server
}

Start-Sleep -s 300

foreach ($workergroupserver in $workergroupservers)
{
$server = $workergroupserver.ServerName
Write-Host “Step3 on $server” -foregroundcolor Yellow

Invoke-Command -ScriptBlock $Step3 -ArgumentList $server
}

Start-Sleep -s 300

foreach ($workergroupserver in $workergroupservers)
{
$server = $workergroupserver.ServerName
Write-Host “Rebooting $server” -foregroundcolor Red

Invoke-Command -ScriptBlock $RebootServer -ArgumentList $server
}

#### END

Yes, I do know this could be better and smaller, not to mention improved. The bottom line is, it is a simple script that does the job very well and at the same time it is simple and easy to follow, even for people not used to PowerShell.

I am sure it will help some of you out there. Any comments and suggestions (and even criticism) feel free to reach out. I am all ears.

CR

6,497 total views, no views today

MDM, MAM, IT and BYOW

Yes, I wrote this during the Super Bowl and as I watched my 49rs (if you do not know I am an old timer 49rs fan but considering they simply went under after the Joe Montana’s Era, I had to keep it quiet) trying to overcome the Ravens, I was reading a twitter conversation going on with Jarian, Dan Brinkmann and Joe.

It was about MDM, MAM, BYOD, etc. Corporate IT locking down/controlling a device the user paid for and all the good stuff that comes with it.

Before I get into that, let’s take a look at what IT became and why I think somewhere along the journey IT deviated and got lost from its main purpose: to identify the tools that can help the business deliver its mission better and deploy them. Basically create the technical foundations for the business to be agile and efficient. Elegant if you will.

Not sure when it happened but certainly during the golden era of the client-server movement, where mainframes or anything that was centralized became a target for this 20th century inquisition. Mainframes were burnt alive and freedom was restored to the people on the other end, as known as users. They started getting these new things called PCs, networked, with processing power and could do stuff. Then when all seemed paradise, hell broke loose. As legend says, users became evil and used a weapon, called PC, to create havoc among IT.

That is what the old IT folks will tell you. And yes I am old. And with an IT background.

Problem is, the story is NOT exactly as told.

As history showed us, simply put, IT became some sort of company Police where users had to be given locked down environments and devices while the IT Gods roamed the earth with no group policies and wide open devices. Have you ever worked on an environment where servers were named Zeus, Olympus, Mars and so on? There is a reason for that.

Funny thing is these users, being locked down and in many cases prevented from working properly or efficiently (how many IT people know 100% sure what users do with their apps?) are the same users that are probably part of sales, some selling millions a year for the company, turning massive profit what at the end pays for IT. The ones bringing the bacon home. Oh irony.

But it gets funnier. As anyone can tell you, IT can indeed live, breath and survive with desktops as locked down as the ones they give to their users. The reason is simple: if you need a wide open machine for whatever, create a VM, throw it somewhere and access if from your locked down desktop. Living proof anyone can survive with a desktop that only has an RDP client for example. Not efficient, agreed. BUT it is possible to work like that. That is the way IT thinks by the way. Or most IT.

The question then becomes, if IT can also live with a locked down desktop, why is IT not doing that? Well because they hate locked down things. That is for users.

If we expand that line of thought and get into the BYOW (Bring Your Own Whatever) it gets even funnier. The same IT police that despises the iPhones of the world, coming from a BlackBerry Empire, are the ones that lined up back in 2007 to buy the first iPhone. And lined up again to buy the iPhone 4. Or the iPad for that matter. The fuckers that made me wait in line for over three hours to get a damn iPhone 4.

They know as a matter of fact the devices, especially today, can be locked down in certain ways. Controlled. Managed. And that bullshit “we do not know the devices” is completely this, bullshit. If you lined up to buy it, chances are you know all these. Plus as IT it is expected you KNOW about the damn fucking IT market and its technologies.

“Claudio you are full of shit and you know it”, some IT people will say. “We have no time as  we are always fighting fires all over the company”.

NO SHIT YOU ARE. 

IT does not want to deal with all these devices. All these technologies. That means more work. Or a lot of work. Regardless, it means work. IT is not supposed to work. It is supposed to fuck users up the arse. And now we have a problem. And things halt to a stop.

The reality is, IT got lazy. Lame. Delivering half ass solutions. Once half ass goes live, shit happens. Shit happens you have to deal with shit. Dealing with shit means I have no time to think about what is important for the business.

NO SHIT.

What needs to happen is a cultural shift, where IT sees users as partners, potentially as revenue making machines that will bring the whole company to new levels. New markets. New businesses. More bacon on the table at the end of the day.

Of course as the liaison between users and the company information, somewhere a line has to be drawn. After all, companies must follow regulations. Policies. Laws. But these lines have to align with the business needs in a way not to hamper it or discourage users. IT has to be loved, not hated.

Until IT shifts towards this, no matter what you do, MAM, MDM, MIM, FU, FUandMe, users will always find a way around. And with that, all the MAM, MDM, MIM, FU, FUandMe will be history, lost somewhere along the way.

For better IT.

CR

3,390 total views, no views today

User productivity to justify something?

This morning I was checking my Twitter and got a post regarding (yes, try to guess) VDI. Again. This time with a different twist. Using the increase (possible one) in productity to justify going VDI. You can read the original post here.

If we were all reading/writing these 20 years ago, I would agree with the article. But today, sorry, I cannot. And I will explain the reasons why.

As per the original article, when typewriters were replaced by computers, even if you are not on IT, you can clearly see how much more a computer can do compared to a typewriter. So at the time we had what I call a fundamental change in technology, something major that will clearly allow for a tenfold productivity increase or more. And that is something any CFO/CEO can clearly see and the reason why typewriters were gone quickly. I compare this kind of event in technology to the asteroid that got rid of the dinosaurs. Something major, abrupt, that has the power to bring major changes to something.

Fast forward to today’s IT landscape and the reality is WAY different. First of all, as I wrote several times, if VDI will indeed replace what we know as a desktop today it will have to introduce one of these fundamental changes. And as you can read on this blog, I do not think this will happen unless hardware changes (major ones) are brought to the table.

So back to the topic, in the past couple years there was nothing huge (another IT asteroid if you will) that would bring a tenfold increase in productivity. Sure, application virtualization, OS virtualization, SBC, VDI, type 1 hypervisors and so on helped in many areas but it was not like what happened with the typewriters.

Plus, as of today, measuring user productivity, is something extremely hard. If, as of today, with the current tools and WITHOUT VDI you cannot give your users what they need to work, there is something wrong with you and/or your company. With current, proven technologies you can probably give way more than what your users need to work. Just remember the Office paradigm where “80% of all users use 20% of all features”.

Add to that the fact if you can indeed give users something they will be able to cut 30 minutes a day from their workload, do you really think they will use these now free 30 extra minutes a day to work more? I do not think so. I can guarantee you these 30 minutes will be spread accross two coffee breaks and a lunch so he gets some extra time to himself. At the end of the day he will be doing the same workload but with 30 extra minutes for himself.

And oh boy, how can you measure that considering users are all different? I can bet in your company there are users that completely understand your IT environment and the tools they have at their disposal. Others probably still do not understand how such mysterious, almost magical device, the mouse, works. This is the reality. Not to mention that with any change it comes user training and not all users, again, are the same. Some may take days to adapt. Others, months. And some will never adapt and will curse you and your changes forever.

The point here is simple. I get the fact that an increase in productivity can indeed be used to justify changes like it did for the extinction of the typewriters. But when the introduction of a new technology brings minor increases (and that is the case in my opinion for VDI – users will still be doing pretty much the same, pretty much the same way) it gets very hard to justify, especially these days when C-level executives are trying to trim all the fat they have been carrying for several years.

In a way it is like trying to justify to your wife why you should get rid of your working, 20,000:1 CR 720p native triple LCD projector in your home theater to buy the 25,000:1 CR, 1080p native one. As a videophile I know the difference and I can see it. But for my wife and most of the people that watch movies at my place, the difference will be minimal (assuming they can see it). Same goes for IT these days.

Unless someone can bring way more to the table, another IT asteroid, I cannot be convinced, as of today, to deploy VDI in 90% of the cases or my customers. I can see it as a solution for maybe 10% of these. But sorry, it is no game changer as a lot of people have been bragging all over the Internet, from Twitter to Blogs. Again, unless some major shift, technological advancement is done on the HW level.

VDI people out there, you need way more to convince me.

Show me what you got.

Cheers.

CR

1,819 total views, no views today