View Configuration Recommendation

21 11 2009

Based on testing and cross referenced with VMware documentation please consider these recommendations for Virtual Machine Hardware and Guest OS configuration when using VMware View 4

RAM considerations

  • Figure an overhead of 96MB of system RAM for one large Monitor and 128MB for two monitors.
  • For a basic Windows XP system you should have at minimum 896MB
  • For a basic Windows Vista/Win 7 32bit system have at minimum 1280MB
  • For Vista 64bit 1792MB at minimum or 2304MB for Win 7

Size your VM’s disk properly

  1. Choose a virtual disk size that will allow for growth but is not overly large
  2. Figure having 1X the total system ram free for suspend actions
  3. In addition to that make sure to allow 1.5X the system ram for swap file storage
  4. Also add another 100MB for log files
  5. So that adds up to 2.5X system RAM plus 100MB
  6. Consider adding about 15% to the total for expansion

For Windows XP set disk space to 16GB plus 5GB for user data (redirected elsewhere or stored on a separate user data disk) and then add a buffer following the above guidelines

For Windows Vista 32bit go with 20GB plus 5GB for user data and add your buffer. In the case of 64bit add another 4-6GB

Note: This is my personal recommended settings. Configured as above your View systems should run well, though you will need to adjust for high-end users that demand more performance or scale down for more limited task workers.

-Matt





Running a PowerShell Script

18 11 2009

So you have some powershell scripts that you want to run directly or perhaps call using the Windows Task Scheduler How do you go about doing that?

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe "& 'c:\PowerShell Scripts\MyScript.ps1'"

 

Explanation

  • You cannot directly run a ps1 file so you have to launch powershell and call the script.
  • To properly call the script use “& ‘<absolute location of the script>’”
  • Note that it starts with a quotation mark, ampersand, and a single quote mark, then the path, then a single quote and another quotation mark to finish it off.




200 coin flips

16 11 2009

So I was reading a reddit posting and the article was about flipping a coin 200 times. I thought that would be a great opportunity to post a quick explanation on how I would go about making a coin flip 200 times without wasting a lot of time. So here it is a Powershell one-liner to flip 200 virtual quarters.

$i,$h,$t=0; while($i -lt 200){$coin = (Get-Random 2); if($coin -eq 0){$h++}else{$t++}$i++} $h;$t

Explanation

  • First we make a increment variable called $i, then we make $h (heads) and $t (tails) and set them to zero.
  • Then we setup how many coins we want to flip: while ($i -lt 200), while the increment variable $i is -lt (less than) 200 we keep flipping
  • Next we flip the coin with Get-Random 2, this gets a random number that has two possibilities (a zero or a one)
  • Then we see if the coin is a heads or a tails with the if statement
  • Then we add one to the heads or tails value
  • Finally we print out the results

There we have it a really quick way to flip two hundred “coins” in powershell

-Matt





Hello world!

13 11 2009

Hello world!
Welcome to my blog, I am starting this blog to post random musings about technology, learning about Powershell, VMware, and other technologies. The goal is to post somewhat helpful comments and provide a link to valuable learning resources.

To start things off, here is using the write-host command to say Hello World!
#Hello World
write-host "Hello World!"

Explanation

  • Write-Host sends typed output to the Host. The host is the name of your current Powershell window.
  • The # symbol allows you to place comments into your scripts making things a lot easier to read and understand when you have to look at a script months later.

-Matt








Follow

Get every new post delivered to your Inbox.