Martin’s New Blog

Thursday, 19. August 2010 0:47 | Author:Frank-Peter

Since August 18th 2010, Martin is blogging on the website of his consultancy company zetConsultants zetConsultants.com/blog

Bookmark and Share

Category:Uncategorized | Comment (0)

How to fix "Copyright 2002-2009 google inc” pop-ups

Friday, 13. August 2010 17:36 | Author:Martin Zugec

I encountered very annoying behavior of GMail (and Google Apps mail in general). Popup with “Copyright 2002-2009 google inc" pops up every 60 seconds while I am logged on…

Turned out it is related to Google Talk – only solution is to make Google Talk able to reconnect again (you get this issue when your google talk keeps trying to reconnect). As far as I know, this happens only on Internet Explorer.

There are few different solutions. I am using client that can handle GTalk also (both IMO and Meebo supports it), so I simply logged off from GTalk. Another working solution appears to be to switch your browser to compatibility mode.

Also switching to basic HTML (bottom of the GMail page). Simply try all these solutions and the one that will reconnect or logoff your GTalk should solve this issue.

Martin

Bookmark and Share

Category:Uncategorized | Comment (0)

Details of 100M facebook accounts published… Or not?

Monday, 2. August 2010 20:24 | Author:Martin Zugec

I logged into LinkedIn today after a while and I was greeted by below screen:

LinkedIn

Reason? Username and password is no longer considered enough secure as a result of recent news about Facebook leak.

Few days ago, “huge” announcements of security bug in Facebook was published (see BBC for example). Let me put it straight, people, THINK!

The whole security non-sense is only about “I decided to publish public information”.

Ron Bowes used a piece of code to scan Facebook profiles, collecting data not hidden by the user’s privacy settings.

Ok, important question is, what does it mean, collecting data?

The list, which has been shared as a downloadable file, contains the URL of every searchable Facebook user’s profile, their name and unique ID.

So the security bug allows you to see link of user profile, his name and unique ID.

Facebook said it was already public information

Exactly – therefore I don’t understand what is all this about.

But Simon Davies from the watchdog Privacy International told BBC News that Facebook had been given ample warning that something like this would happen.

"Facebook should have anticipated this attack and put measures in place to prevent it," he said

Ok, so next time I will try to change my status, Facebook should reject it and tell me that cannot share my information. Or I should upload my pictures directly to the Facebook’s recycle bin.

Don’t get me wrong, I understand the risk of publishing too many information to social networks, however that doesn’t have anything to do with provider (like Facebook). I don’t like Facebook personally, however I also don’t like such security non-senses like this announcements (reminds me of “Powershell virus” few years ago).

Martin Zugec

Bookmark and Share

Category:Uncategorized | Comment (0)

Powershell-enabled business card :)

Friday, 25. June 2010 10:12 | Author:Martin Zugec

Hi all,

my new business cards just arrived, enjoy! Obviously, I really love Powershell ;)

Business Card

Martin

Bookmark and Share

Category:Uncategorized, Windows PowerShell | Comments (2)

foreach executes code unexpectedly

Thursday, 24. June 2010 17:33 | Author:Frank-Peter

Hello again, Frank-Peter here.

The other day, one of my PowerShell training participants stumbled upon an issue with foreach: if you try to run a foreach loop against an empty variable whose type isn’t array the loop will execute the code once. This can be demonstrated easily either in PowerShell 1.0 or 2.0 with the $null variable:

PS C:\Test> foreach ($element in $null) {write-host "element: $element"}
element:
PS C:\Test>

In that case I’d expect that foreach doesn’t execute any code meaning that foreach should treat an empty or undefined non-array variable as same as an empty array variable (like shown below):

PS C:\Test> foreach ($element in @()) {write-host "element: $element"}
PS C:\Test>

So take care ;-)

Bookmark and Share

Category:Uncategorized | Comments (1)

How To Remotely Administer A Citrix Farm From The PowerShell Prompt?

Thursday, 10. June 2010 14:15 | Author:Frank-Peter

If you’re using Windows PowerShell to administrer and automate Citrix Farms the day will dawn when you ask yourself (or someone else) if it is possible to fire up the locally installed Windows PowerShell Console in order to perform a task against a Citrix Farm remotely. Yes, it is possible

In case of XenApp 6 you make use of PowerShell 2.0′s Remoting feature as follows:

#
# Remote XenApp 6 w/ PowerShell 2.0 Remoting
#
$CitrixServer = 'ctx001'

$session = New-PSSession -ComputerName $CitrixServer
Enter-PSSession -Session $session

Add-PSSnapin Citrix*

In case of MFCOM-based Legacy Farm Server you can either create a PowerShell Remoting Session like above or – if you still use PowerShell 1.0 you have no other choice – create a remote COM object:

#
# Remote MFCOM w/ PowerShell 2.0 Remoting
#
$CitrixServer = 'ctx001'

$session = New-PSSession -ComputerName $CitrixServer[activator]::CreateInstance($type, $null)
Enter-PSSession -Session $session

$farm = New-Object -ComObject 'MetaFrameCOM.MetaFrameFarm'

#
# Remote MFCOM w/ PowerShell 1.0 and .NET
#
$CitrixServer = 'ctx001'

$type = [type]::GetTypeFromProgID('MetaFrameCOM.MetaFrameFarm', $CitrixServer)

$farm = [activator]::CreateInstance($type, $null)
Bookmark and Share

Category:Citrix, PowerShell | Comment (0)

Groupware != Exchange

Wednesday, 9. June 2010 22:41 | Author:Martin Zugec

As you maybe know, I have decided to start my new career as freelancer and one of first important decisions I had to make was regarding groupware (understand – mail + calendar + contacts).

In last few years, I got extremely used to combination of Exchange + Outlook + Windows Mobile. Synchronization of emails is nice, however what is extremely important for me is ability to synchronize calendar and contacts. I love the fact that I can add meeting to my Outlook and my mobile will let me know what, when and where.

As I said, I am starting as freelancer, therefore I started one-man consultancy company. I considered few different scenarios:

1.) Hosting my own Exchange server
2.) Microsoft BPOS
3.) 3rd party Exchange hosting
4.) Google Apps

Above options are based on my preferences (1 is most preferred, 4 is least preferred).

However, soon I realized that each of them got disadvantages.

Hosting my own Exchange server

Of course, most flexible solution, however not cheapest. I will need to have server at home running 24/7 and of course downtimes of my providers could affect my business. Economical? Not really (electricity etc). Easy too use? Also not :(

Microsoft BPOS

BPOS (Business Productivity Online Suite) is Microsoft set of services. It is part of global MS strategy regarding cloud computing (Azure = PaaS, BPOS = SaaS, IaaS is not covered yet). It costs $5 per account (monthly), which is very interesting and cheap. My problem however was that you had to buy at least 5 accounts (which is ok for small company, however not for freelancer).

3rd party Exchange hosting

Same as BPOS, however more expensive and not covered by big company (like MS). Advantage is that (for some providers), Outlook license is included ($10 per account per month).

Google Apps

Originally, this was not really an option for me. But surprise, surprise, Google won this fight :) What you get as part of Google Apps? Email, calendar, contacts, documents and sites.

There are two editions – Standard and Premium. Most important difference for me is that Premium is paid service, it offers 25GB mailbox, support for Outlook client (!) and of course support & SLA. Standard is available for free on other hand.

What is very nice is that Google Apps supports Windows Mobile natively (!). All you need to do is to specify m.google.com as address of your Exchange server and you will get push notifications. Registration and usage is very simple – Google still follows minimalism approach.

Martin Zugec

Bookmark and Share

Category:Uncategorized | Comment (0)

How To Migrate A “Legacy” Citrix Farm To XenApp 6?

Wednesday, 9. June 2010 15:01 | Author:Frank-Peter

Recently, I wrote here about the release of the Citrix XenApp 6 PowerShell SDK and that XenApp 6 neither supports nor contains the MFCOM programming interface of XenApp 5 and older versions (which I will call Legacy Farm from now on).

Upcoming Legacy Farm to XenApp 6 migration projects will definitely go along with the requirement to automatically export the Legacy Farm’s objects like Applications or Administrators in order to import them into the new XenApp 6 Farm. Since XenApp6 has no MFCOM support you won’t be able to use MFCOM based migration scripts you may have written for former migration projects. What you need instead is a Migration Tool that “speaks” both MFCOM and XenApp 6 Commands – meaning a tool that is able to communicate with the Legacy Farm as well as the new farm.

Good news is that such a tool is already available, currently it is still in Beta and it is supposed to be released in mid of this month – the Citrix XenApp 6 Migration Tool (Download)

The XenApp 6 Migration Tool contains a PowerShell 2.0 Module whose Cmdlets and Functions can be used to export Legacy Farm settings from a XenApp 5 Farm and import them to a XenApp 6 Farm. The following types of objects can be migrated:

  • Application
  • Folder
  • Load evaluator
  • Policy
  • Server configuration
  • Farm configuration
  • Administrator

Settings you can’t transfer:

  • Zones
  • Printer management
  • Configuration logging settings

The XenApp 6 Migration Tool supports only migration from a single XenApp 5 Farm. It isn’t possible to consolidate multiple Legacy Farms into one XenApp 6 Farm. The Legacy Farm must be based on XenApp 5 for WS2003 + HRP5 or XenApp 5 for WS2008. The new farm must be running XenApp 6 for WS2008 R2.

Bookmark and Share

Category:Citrix, PowerShell | Comment (0)

How To Migrate XP User Profiles to Windows 7?

Tuesday, 8. June 2010 14:59 | Author:Frank-Peter

In corporate IT environments, the broken compatibility for user profiles leads to formidable challenges in Windows XP to Windows 7 migration projects. Even if it seems possible to automate this task using “homebrew scripts” – forget about it.

You definitely can save hours and days of development time if you spend 30 minutes in order to read Benny’s Immidio White Paper Migration To Windows 7 with Immidio Flex Profiles (Download)

Bookmark and Share

Category:Immidio Flex Profiles | Comment (0)

Expand %varname%

Wednesday, 19. May 2010 12:08 | Author:Frank-Peter

Hello again! Today I will share a small PowerShell function, ExpandEnvironmentVariables that I use to expand environment variables that are written in legacy syntax (%varname%). For instance, the function is useful if you read values from configuration text files that may contain variable names.

ExpandEnvironmentVariables supports PowerShell 1 and 2. It is designed to accept pipeline input and uses the ExpandEnvironmentVariables() method of the System.Environment class to resolve variables. The function supports nested variable references

function ExpandEnvironmentVariables {
	param (
		[string]$String
	)
	begin {
		function _exp ([string]$str) {
			$s1 = $str
			$s2 = [System.Environment]::ExpandEnvironmentVariables($s1)
			while ($s2 -ne $s1) {
				$s1 = $s2
				$s2 = [System.Environment]::ExpandEnvironmentVariables($s1)
			}
			$s2
		}
	}
	process {
		if ($_) {
			$String = $_
		} elseif (!$String) {
			throw 'No value for the String parameter specified.'
		}
		_exp -str $String
	}
}
Bookmark and Share

Category:Scripting, Windows PowerShell | Comment (0)