Monthly Archives: April 2013

MS Training

We have an EU funds program that covers some of the employers expenses on personnel education via courses and/or exams.

The downside is that you have to sign up for those in advance and this works out perfectly fine for us; the spots are filled in in the last moment. 

Implementing and Managing Microsoft Desktop Virtualization

Funny thing is – after 3 years have passed since the exam has been available to public and 2.5 years after the release of the courses – the technologies mentioned in the courses are more or less deprecated (the concept is not, however) – med-v 1.0, app-v 4.6, server 2008 r2; in IT things go fast!

These are the first MS courses I ever attended, the average price being 15 hundred USD is not really something I’m willing to give up unless promised a return on investment; and making money of students is a massive trend recently; there’s a nice Russian proverb about that – “If you can’t do something, go and teach it”.

Days of slide-reading (English studying materials – > Latvian translation) are already getting to me in a bad way. No real-life examples; though, it has been mentioned that it’s really doubtful some things like Med-V are being actively used in enterprise environments (from my experience – it’s less expensive to actually solve those compatibility issues than support extra infrastructure components).

The not-so-good first experience. 

Things I enjoyed:

1) MS has everything laid out and managed, specific requirements for hardware, software, step-by-step guides for all the tasks involved

2) study class hardware was pretty good – i7, 16 gb of ram and raid0.

3) high-speed internet in classrooms

4) structured studying material and proper approach

5) a minor bonus to my CV + experience

6) Take-aways: book, e-book, good times 


1) Slide reading; honestly I would feel more comfortable sitting with a book and doing all the reading/labs all by myself; probably the trainer did not bring a lot of benefit

2) Course would be actual at the time (or even before) of it’s release +1 year tops, but not now

3) Could really use more real-life examples (we had almost nil) 

The aftermath is that I have to pass the following exam: Exam 70-669: TS: Windows Server 2008 R2, Desktop Virtualization 

Being on the lectures really made me wonder how much time (and health) do I really invest in learning and studying to be competitive on the market and does it really pay off, this will require a separate blog entry.

Google has you

This has happened last week. For the first time in my live I’ve verbally heard a person saying he is giving up on solving an issue/incident/problem/whatever because he failed finding it in a search engine.

This is how ingenuity plummets.

P.S. It’s been like 1 month since I’ve started using Bing too; for my taste and from the search q’s I usually need – it’s strictly worse than Google. Though using both improves the experience.

Event Viewer monitoring for app-v and combating lazyness



Some time ago I had a .vbs script for pulling data from a number of PC’s that were configured with app-v client 4.2. For some odd reason way back when I decided on implementing it by parsing app-v log files (there even was a special utility from Microsoft that let you do that!) by grabbing them from the administrative shares. On paper it looked like this:


1) Get all app-v .log files from a number of servers 

2) Parse them for relevant entries defined by criteria (typically day/week/month periods of time) 

3) Output to excel 

4) Sort and color the data in excel to make a pretty report  

To my dismay – the script has been lost over time and I’ve been rather lazy to re-write it, seeing as how there weren’t a lot of cases I would use this on. 

Lately, though, there have been a number of incidents in customers’ environment that required aggregating such information and asking the users for error message information is not my style.

Knowing the general health state is never a bad thing too or understanding the scale of tragedy if you like to put it like that. 

Pulled myself together one evening and used powershell (even powershell v3, because I’ve been in a hurry to get it done, there are a couple of nice features there that I didn’t want to write custom functions for) to solve this.

The works




#Number of days to q the report for
$ReportDays = -7

#Source of the event
$eventsource = "Application Virtualization Client"

#Error message to search for
$errormessage = "*The parameter is incorrect*"

#Setting timestamp
$timestamp = Get-Date -format "dd-MMM-yyyy HH.MM"
$timestampfull = Get-Date

$ScriptTitle = "<h2>App-V Health Check<br> Author: gregbin<br> Report Date: $timestampfull<br></h2>"
$ReportTitle = "App-V Health Check Author: gregbin Report Date: $timestampfull"

#I had to use this as the number of target servers can be rather large
Function Limit-Jobs {    		
	$jobs = (get-job -state running | Measure-Object).count      
	$RunningJobs = 0       		
	if($jobs -ne $null)	{$RunningJobs = $jobs}     	
	while($RunningJobs -ge $MaxConcurrent)	
		$jobs = (get-job -state running | Measure-Object).count      
		$RunningJobs = 0       			
		if($jobs -ne $null){
			$RunningJobs = $jobs 
		Write-Warning "Current Running Jobs: $RunningJobs" 
		start-sleep -seconds  $PauseTime 		

#Defining target servers; can be populated by using other popular means, for example, through pulling AD
$Servers = @("test")

#Formatting for html output
$head = '<style>
BODY{font-family:Verdana; background-color:white;}
TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}
TH{font-size:1.3em; border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color:green}
TD{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color:palegoldenrod}

#Starting numerous jobs to pull data from servers
foreach ($server in $Servers)
#Limiting the number of Jobs
Limit-Jobs -MaxConcurrent 20 -PauseTime 10
Write-Host "`r`nCurrently starting job for: $server"
Start-Job -ArgumentList $server, $ReportDays, $eventsource, $errormessage  -ScriptBlock {param ($server, $ReportDays, $eventsource, $errormessage) Get-EventLog -LogName Application -ComputerName $server -EntryType Error -Source $eventsource -After (get-date).adddays($ReportDays) | Where-Object {$_.Message -like $errormessage}}

$FinalReport = Receive-Job (Get-Job) -Wait -AutoRemoveJob

$FinalReport | Sort-Object TimeGenerated -Descending | ConvertTo-Html -Property TimeGenerated,MachineName,Message -Title $ReportTitle -PreContent $ScriptTitle -PostContent $ScriptTitle -Head $head >> appvreport_$timestamp.html


Next steps include writing an UI to accommodate for this functionality, I can definitely see myself using this in multiple customer environments when I need to pull event viewer data without having to setup event subscriptions; for app-v and whatever else.