Saturday, April 28, 2007

Counting in GB/MB/KB In PowerShell

One of the cooler features within PowerShell is the ability to calculate using 'real'  kb, mb, gb. By 'real', remember that 1 kilobyte (kb) should be 1024 and thus 10kb is 10,240 (and not as disk manufacturers like to use, 10,000). The same holds true for megabytes (1mb = 1,048,567 vs 1,000,000),   and gigabytes (1gb = 1,073,741,824 vs 1,000,000,000). 

The reason all this matters is that when viewing object sizes you can get figures in either raw bytes, or in kb/mb/gb. PowerShell helps by defining a special set of constants to represent kb, mb, and gb.

You can demonstrate this in PowerShell as follows:

PSH [D:\foo]: 1kb
1024
PSH [D:\foo]: 1mb
1048576
PSH [D:\foo]: 1gb
1073741824

This is pretty useful when calculating  file sizes, for example:

PSH [E:\vpc vms\LonghornB3]: (ls bigupload.zip).length.tostring("##,###.#")
2,795,251,968
PSH [E:\vpc vms\LonghornB3]: ((ls bigupload.zip).length/1mb).tostring("##,###.#")
2,665.8
PSH [E:\vpc vms\LonghornB3]: ((ls *.zip).length/1gb).tostring("##,###.#")
2.6

One unfortunate omission, however, in PowerShell V1.0 is that the dev team did not do a land grab for more constants (i.e. tb=terabyte, pb=petabyte and eb=exebyte). Today, Hitachi is shipping a 1tb disk - thus within the life of Vista/Longhorn, TB will become a not uncommon size (of course SANs today measure in the the TBs already). The Petabyte/Exebyte ranges may be a bit of a ways off being commonplace, but why not just reserve them now? I hope this is something that gets added to V2.0.

Technorati tags: ,

Friday, April 27, 2007

UK Desktop Deployment Resources

The MS UK Desktop Deployment team have created a neat site full of deployment resources. These resources include:

  • Streaming videos covering the DDPS content
  • Presentations from the recent Community Deployment Summit held in Reading (including talks by Garry Corcoran, Paul Butterworth, Steve Green, etc).
  • Links to the BDD spruce code
  • etc

If you are into Desktop deployment,  check out the UK Desktop Deployment site.

 

Thursday, April 26, 2007

टेस्ट ऑफ़ ब्लॉगर इन Hindi

नॉट सुर वहत यू विल सी इन थिस पोस्ट - इत'एस मेंत तो बे अ मेसेज कोन्वेर्तेद इन्तो हिंदी। थिस इस अ न्यू फेतुरे अस पार्ट ऑफ़ ब्लॉगर। ई दो नॉट स्पाक/ओर राइट हिंदी - सो इफ यू दो, प्लेस कमेंट अस थे क्वालिटी ऑफ़ वहत यू रीड/सी।!

Still More on Longhorn B3 Download

Further to earlier posts, Longhorn B3 does appear to be on MSDN. After a reboot of Vista, I was able to finally get to the MSDN download site, to find Longhorn is available (and can be downloaded using the FTM download manager).

Interestingly - the download speeds from MSDN are around 600KBPS vs just under 200 from the TechNet site. And as mentioned earlier, downloading via Technet is a raw download - and mine aborted half way through!

Lonhorn downloaded in under an hour - now that rocks.

More on Longhorn B3 Download

I blogged earlier today about Longhorn B3. It would appear the download centre is pretty busy. Oddly enough, it would appear like there is a lot of interest. 

If you go to the link noted in my earlier article, you can select your download and 'order" it (although the cost is £0.00).  Eventually, you will get an Order Receipt, with a license key and a link to the software. You may get page time outs and a "The download you requested is unavailable" message.

Oh - and the "Technet" download does NOT use the FTM manager, which means if your wireless drops out at half way through, you appear not to be able to restart it. :-(

Also - this download does not appear on MSDN. Having said that, MSDN  is broken from here again - I am getting an endless loop - each time I CLICK the "see all available downloads", I get re-directed back to http://msdn2.Microsoft.com/en-us/subscriptions/default.aspx. How unhelpful.

When will MS stop re-inventing wheels in terms of downloads (which seemingly break each time a new product with a new method is launched)??

Microsoft Longhorn Beta 3

 Microsoft has shipped the public Longhorn Beta 3. Go to this page to select your download. Or see this link to Microsoft Windows Longhorn Home page. 

The beta is available in English, German and Japanese. And, at present, it appears as though only  the US download centre is currently active.

Get downloading!!

 

Tuesday, April 24, 2007

Microsoft adds PowerShell to newest Longhorn Server preview

Microsoft adds PowerShell to newest Longhorn Server preview!  This has to be about the best move MS has made with Powershell in quite some time. In the latest Community Technology Preview builds, PowerShell can be added as a feature.

Now all MS have to do is to work out hot to get PowerShell onto Server Core and life will really be good!

 

Monday, April 23, 2007

Know VBScript? Convert to PowerShell!

Loads of IT Pros know how to use VBScript to perform common bits of task automation. Converting to PowerShell means learning a different approach which can take time.

To assist, Microsoft has creates this page which  has details converting VBScript Commands to Windows PowerShell Commands.

 

Technorati tags: , ,

The Problem With Asking Your Customers What They Want...

... is that they may tell you things you do not want to hear.

Dell's IdeaStorm project has been asking Dell customers what they want. As this story illustrates, one thing they seem to want is Windows XP as opposed to Windows Vista.

The Silicon.com piece quotes IDC analyst Richard Shim as saying "That there is remaining demand from some segment of the consumer market points to the inability of Vista to resonate with consumers".

All My Faves | Why Search?

This is kind of a cool page - a sort of mini-portal to all the places you're likely to want to surf to.  Includes web mail sites, maps, search engines, weather, banks, magazines, etc, etc.

 

MSDN Wiki still not working properly

As I reported yesterday, the MSDN Wiki is having some problems accepting updates. This morning, I created a couple of new PowerShell based samples for posting. Around 1 in 5 updates actually made it - the rest resulted in a HTTP 500 server error, and the dreaded error page.

I tired to post over on the MSDN Wiki Blog, but sadly, that blog has comments turned off so it's not possible to alert the team via the blog. :-(

What a great advert for hosted services (not).

 

Sunday, April 22, 2007

MSDN Wiki Having Problems

I've been adding PowerShell related content to the MSDN Wiki (http://msdn2.microsoft.com/en-gb/default.aspx)

Over the weekend, I've been getting 500 errors when posting  content - resulting in error pages and loss of added content. Not to mention a lot of extra work re-typing the lost content!!

Please - can someone shove a shilling into the meter?

 

Stumbleupon

Stumbleupon is a neat site (with a cool Firefox add-on) that enables you to channel surf the web, and find some cool web sites, photos, videos, etc. I use Sumbleupon to find cool new link.

See www.stumbleupon.com where you can join for free (there are just over 2.1 million registered users at the time of writing). You can also download a neat tool bar for Firefox.

One page I've just found, using StumpleUpon is http://www.allmyfaves.com/indexgrad.html. A cool shortcut to all manner of useful sites.

Monday, March 26, 2007

Help in Vista Now Available

In an article I posted last December, I bemoaned the lack of WinHlp32.exe in Vista. At that time the updated Winhlp32.exe was not available. This was described in KB 917607.

Re-visiting the KB - and an updated version of WinHlp32 is now available.  This provides a version of WInHlp32.exe for both 32-bit and 64-bit versions of Vista. Installing the update brings back support for older Windows help files.

Technorati tags: , , ,

More on SMTP on Vista

In a blog article posted recently, I pointed out that the SMTP service had been removed from Vista.  In an article in one of the IIS Team blogs,  Bill explains this as follows: "The SMTP server has always fit under the 'IIS' umbrella, but wasn't actually owned by the IIS team.  The folks that owned it have decided to no longer ship it in Vista (the Windows client SKU) and instead are only shipping it in Longhorn Server."

So a team decided just to not ship it. Nice to know that this was a conscious decision. Sadly, it's yet another regression from XP, and one more reason to stick with XP on my laptop. For me,  and others, a better answer would have been for IIS to take ownership of the SMTP service.

 

Technorati tags: , , , ,

Sunday, March 25, 2007

SMTP In Vista (or not)

I'm dual booting my laptop between Vista and our corporate Windows XP SP2 build. On my XP build, I've installed the SMTP service to enable me to send mail on the road. I've had some problems with my existing supplier, and I was looking for a better answer and there it was as part of XP. I installed the SMTP service, and after a bit of configuration, I have it setup to send mail and not to act as a relay agent. This is working great.

I then booted back to Vista after several days using XP, and went to add the SMTP service to my Vista install. But It's not there! The service was removed in Vista's version of IIS 7.

In the meantime, I've found a replacement, a nice shareware SMTP service that works under Vista. This is the 1st SMTP Server, a shareware program. It works free for 30 days, then dies with the ongoing license costing US$49.

The package is small to download (1.2MB for the zipped version) and the installation is trivial.  See the 1st SMTP Server home page for more info on the product.

Once installed, the working  set is around 9.2mb at start, but it grows. The initial handle count also seems quite high (116) and it grows too. Not sure if this is handle or memory leaks, or  just a program getting started. I'll watch the performance over the next day or two. 

It's a shame that the SMTP feature was dropped from Vista. Maybe MS will consider adding it back in SP1. Although by that time, I'll have licensed the 1st SMTP server!

 

Tuesday, March 20, 2007

PowerShell - Format-Graph cmdlet

I just stumbled  over a neat newly created PowerShell Cmdlet, called format-graph. This cmdlet is described on the author's blog.

Format-graph gets the data to be formatted from the pipeline. you can get the source code from SourceForge.

 

Technorati tags: ,

Thursday, March 08, 2007

PowerShell Community Extensions 1.1 Ships

Some time  ago, a number of PowerShell fans created the PowerShell Community Extensions project up at Codeplex. This provides a number of useful features and is part of my default install!

The team have created a new version, V1.1 which is now available for download. Version 1.1 adds a  lot of new and enhanced features.

New cmdlets include:

  • Get-FileVersionInfo
  • Get-PEHeader
  • Resolve-Assembly
  • Test-Assembly
  • Ping-Host
  • Resolve-Host
  • Select-Xml
  • Write-BZip2
  • Write-GZip
  • Write-Tar
  • Write-Zip

The biggest new features are the two new providers, including an  Active Directory provider that works. COOL!!!

If you work with PowerShell, you should be running these extensions.

 

Wednesday, March 07, 2007

Installing Console with PowerShell

On Monday, I published an article on an open source application called Console. This app creates a better console (cmd.exe) environment,  in which you can run PowerShell.

I got a comment on the blog as to how to install it. Easy - first download the zip file from SourceForge, extract it to a folder on your local system and  run console.exe. Create a shortcut to your desktop. And to get to PowerShell - just type PowerShell

 

Tuesday, March 06, 2007

PowerShell Analyzer - A Public Beta

PowerShell Analyzer is a rich interactive environment for Windows PowerShell. As described on the web site, Powershell Analyzer has the typical editor and IDE functionality needed by IT Pros and developers alike.  A nice product.

Karl Prosser, super-star author of this cool tool, has released a public beta which you can download the beta from Karl's site.