Month: November 2009

Using Write-Progress cmdlet with BITS file transfers

As you may know already, I released my first PowerPack for PowerGUI sometime last week. I am currently looking at various other features I want to add to this powerpack. One such feature is displaying progress information for each file transfer. While trying to figure out how I can implement this within PowerGUI Admin console, I came across a nice cmdlet Write-Progress which is used to show progress bars. Though this is a nice cmdliet, I can not directly use this in the powerpack. However, I want to show how to use Write-Progress cmdlet with BITS file transfer. To load BITS file transfer PowerShell cmdlets Import-Module BitsTransfer To start File Transfer $bitsJob = Start-BitsTransfer -source http://download.microsoft.com/download/7/8/A/78ACCE4D-D1DD-4E54-80DA-928DCFD3AD6A/OfficeServer.exe -destination “C:\SharePoint” -Asynchronous To view the progress, $bitsJob | ForEach-Object {  while ($_.JobState -eq “Transferring”) {   $pctComplete = [int](($_.BytesTransferred * 100)/$_.BytesTotal);   clear-host;   write-progress -activity “File Transfer in Progress” -status “% Complete: $pctComplete” -percentcomplete $pctComplete   sleep 10;  } }  This is it. You will see a progress bar at the top of PowerShell window as shown here. If you close and open …

SharePoint 2010 (beta) standalone install on Windows 7

I am a bit late on writing about this but nevertheless, I think I have some useful information to share. I needed a demo system for my SharePoint 2010 talk at Bangalore IT Pro user group meet tomorrow. For this purpose, I started installing SharePoint 2010 on my Windows 7 laptop. I knew that there are a few issues with SharePoint 2010 standalone deployments on Windows 7. You can read about it here. Before you get started with the install, here is a quick note about using SharePoint 2010 on Windows 7 (as posted on MSDN) The development environment that you create by using these instructions will not support SharePoint farm installations, and you should not host active production sites with this configuration. These instructions will enable you to get started with an environment that is specifically suited to developing SharePoint custom solutions. Now to the real stuff There is a prerequisite installer included with SharePoint 2010. However, this won’t run on Windows 7. For installing SharePoint 2010, you need the following prerequisites. You can …

BITS file transfer PowerPack for PowerGUI

I have been writing PowerShell scripts for various things but never really released anything developed in PowerShell. This is evident more or less from the Script Center downloads on this site. However, there is a change in that thought process now. I am going to do more work on PowerShell than VBScript. First step in this process is the release of my BITS file transfer PowerPack. This is my first PowerPack release and first ever PowerShell release to the community. This powerpack is self-explanatory and easy to use. I am working on a user guide for this and will post it on the publications page as soon as it is ready. Download the PowerPack and do let me know your views. BTW, I just spent 2 hours writing this PowerPack. PowerGUI PowerPack development is quite fast and easy. You can refer to Kirk Munro’s post on http://poshoholic.com. This is just the initial release and I will update this with more features in the next release.

Unattended install of SharePoint 2010 prerequisites

Update: This post was written when SP2010 was in beta. Pls review the prerequisite installer unattend parameters with the RTM version. Update: I have also posted another article on installing prerequisites remotely, Do check that. http://139.59.40.198/blog/?p=1888 First, SharePoint 2010 beta is out there for general public. You can download your copy at http://sharepoint2010.microsoft.com/try-it/Pages/Trial.aspx You can find a complete list of software requirements to install SharePoint 2010 roles @ http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx#section3 Here are the requirements for installing 2010 on a web-front end server in a server farm SharePoint 2010 prerequisite installer can download these from the Internet provided the system has a connection open to Internet. You can also download each of these components youself and install them manually. You can download them at http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx#section4 That is a pretty big list..huh.! Now the issue is, I need to deploy SharePoint 2010 on multiple servers and virtual machines. Again, this on a repeated basis. I cannot sit at each server and install all of these bits manually. Also, none of these physical servers or virtual machines will have access …

Auto generating VMConnect shortcuts for all Hyper-V virtual machines

I am sure this is one of the things written and read quite a bit. I just want to post my thoughts and how I try to simplify these things for me. I usually don’t write about anything that is not “my” content. As with all other things on this blog, I prefer automation and through this post I will provide a script that creates all the shortcuts for you automatically. If you don’t have the patience to read till the end of this post, click on the link below to access the script that generates these shortcuts. However, read the usage procedure for running the script towards the end of this post. What is this about? Coming to the subject of this post, I use Hyper-V at work and at home for various things. One thing I often need to do is access the console of these virtual machines. The usual (/boring) way to do that is to access Hyper-V Management console and then double-click on each virtual machine you need to access. The better way …

Sysinternals: Auto update script for sysinternals tools

I have written it many times but I like to say it again and again. I am a Sysinternals fan. I use their tools quite often, if not everyday. Sysinternals team releases updates to these tools often. These updates are either bug fixes or somtimes new features / tools. There are multiple ways to know about these updates Subscribe to sysinternals blog RSS feed and download the update manually Visit sysinternals website regurarly and get the updates when ever available Or many other ways…. I am not used to any RSS aggregators or readers. Even if I use one, I still have to manually download the update. It is the same case with visting their website. I wanted to write something to automatically update my sysinternals tools folder as and when there is an update. Again, there are multiple ways to achieve that. I could have written a RSS listener service which will look for updates in the Sysinternals feed and download the updates once they are available.  But that is too complex for a simple task like downloading files from a website. My method to achieve …