≡ Menu

As promised MS has announced Windows 8 Consumer Preview version and many enthusiastic people has already downloaded and playing with it.

There are two download methods available for this product.

1. Windows 8 Consumer Preview Setup:

If you go to http://windows.microsoft.com/en-US/windows-8/download and request for download, you will see a “Windows8-CustomerPreview-setup.exe” downloading. Basically what this does is, it analyzes your system and gives a detailed report about compatibility of your hardware with Windows 8 Customer preview version and also gives you the tools which can use to build media(DVD/Flash disk) from ISO files.

This is a good option for home users who want to upgrade their current PC to windows 8 CP.

2. Windows 8 ISO files Download:

This is for System administrators like me and also for people who want to do the download from one computer and install it on a different one. You can download the ISO files from http://windows.microsoft.com/en-US/windows-8/iso. English, Chinese(simplified), German, Japanese versions are available for download in both x64(64-bit) and x86(32-bit) formats

Well, after choosing your download method, the next step is installation. Like for any other installation, Windows 8 also has it’s own system recommended configuration for giving better performance.

 

System Requirements

Windows 8 Consumer Preview works great on the same hardware that powers Windows 7:

  • Processor: 1 gigahertz (GHz) or faster
  • RAM: 1 gigabyte (GB) (32-bit) or 2 GB (64-bit)
  • Hard disk space: 16 GB (32-bit) or 20 GB (64-bit)
  • Graphics card: Microsoft DirectX 9 graphics device or higher
  • To use touch, you need a tablet or monitor that supports multitouch
  • To access Windows Store and to download and run apps, you need an active Internet connection and a screen resolution of at least 1024 x 768
  • To snap apps, you need a screen resolution of at least 1366 x 768

 

Hope this information helps you to get started with this brand new OS.

You can also refer to my previous blog post about problems with installing windows 8 Developer preview in virtual environment. People has made good amount of suggestions in comments sections which you will find useful. You can also go through blog post from Microsoft(http://blogs.msdn.com/b/b8/archive/2012/02/29/running-the-consumer-preview-system-recommendations.aspx) to get more details.

Feel free to raise if you have any questions.

 

 

{ 0 comments }

Simple steps to increase your laptop battery life

While researching for some material to prepare my previous article, I stumbled on one of the posts of “Microsoft at work” blog. The post is about best practices to give good life to your battery. The points discussed in the article are interesting and I felt worth sharing it.

You can read the article at http://www.microsoft.com/atwork/maintenance/battery.aspx

 

 

{ 0 comments }

Are you looking for a way to change power plan on local or remote computer? You are at the right place. The script discussed in this article will help you in changing the power plans in PowerShell way. MS built-in tool(powercfg.exe) is available that can also help you to do this job. But I am not using that tool in my script by building a wrapper around it. I am simply relying on WMI class to change the power plan. I recommend WMI way because using executables inside script is not a good practice and it should be our last resort when it is not possible through WMI or dotnet class or some API.

The Win32_Powerplan WMI class will return list of power plans available in the computer. This list includes built-in power plans like”Power Saver”, “Balanced” and “high performance” plus any custom power plans that user has created. Each returned power plan a again  a object which will have a method called Activate() to activate the current power plan. This power plan object also contains a proper called IsActive which will be set to $true if is the active power plan that system is using currently.

The code follows…

Set-PowerPlan.ps1

[cmdletbinding()]                        

param (
[parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
[string[]]$ComputerName = $env:computername,                        

[ValidateNotNullOrEmpty()]
[parameter(Mandatory=$true)]
[ValidateSet("Power Saver", "Balanced", "High Performance")]
[string]$PowerPlan                        

)                        

begin{}                        

Process {
foreach ($Computer in $ComputerName) {
 if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {
  Write-Verbose "$Computer is online"
  $PreviousPowerPlan = Get-WmiObject -Class Win32_Powerplan -Namespace root\CIMV2\Power -ComputerName $Computer | ? {$_.IsActive -eq $true}
  $CurrentPowerPlan  = Get-WmiObject -Class Win32_Powerplan -Namespace root\CIMV2\Power -ComputerName $Computer | ? {$_.ElementName -eq $PowerPlan}
  $CurrentPowerPlan.Activate()
  $OutputObj  = New-Object -Type PSObject
  $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer.ToUpper()
  $OutputObj | Add-Member -MemberType NoteProperty -Name PreviousPlan -Value $PreviousPowerPlan.ElementName
  $OutputObj | Add-Member -MemberType NoteProperty -Name CurrentPlan -Value $CurrentPowerPlan.ElementName
  $OutputObj
 } else {
  write-Verbose "$Computer is offline"
 }
}            

}                        

end {}

 

Save the above code into a file called “Set-PowerPlan.ps1” and it is ready for usage. You can use -ComputerName parameter if you want to run against a computer. If this parameter is not specified, it runs on local computer.

Go through the below examples for usage instructions and let me know if you have any questions.

Hope this helps…

{ 2 comments }

MS tool for reporting Outlook calendar issues

Troubleshooting calendar issues is one of the pain areas in Exchange/Outlook. Always there will be ‘n’ no.of items we need to verify to identify why it went wrong. Bad thing about it is, there won’t be any logging in Exchange/MS Outlook to understand what went wrong. All you can do is enable debug logging and send the ETL files to MS support for analysis.

Well, that is a history now. MS has  a tool that can check and report problems with calendar in a given outlook profile. It can also run against mailboxes hosted on a given server. As mentioned, it is just a reporting tool, and will not fix any of the problems. Hmm, having something is better than nothing 🙂

The good things about this tool is it supports below Exchange/Outlook versions.

  1. Microsoft Office Outlook 2003
  2. Microsoft Office Outlook 2007
  3. Microsoft Office Outlook 2010 (32-bit)
  4. Microsoft Office Outlook 2010 (64-bit)
  5. Microsoft Exchange Server 2003
  6. Microsoft Exchange Server 2007
  7. Microsoft Exchange Server 2010

 

What checks this tool does?

The Calendar Checking Tool for Outlook (CalCheck) is a command-line program that checks Microsoft Outlook Calendars for problems. The tool opens an Outlook profile to access the Outlook Calendar. It performs various checks, such as permissions, free/busy publishing, delegate configuration, and automatic booking. Then each item in the calendar folder is checked for known problems that can cause unexpected behavior, such as meetings that appear to be missing.

As CalCheck goes through this process, it generates a report that can be used to help diagnose problem items or identify trends.
Checks performed

The following Calendar-specific checks are performed and logged in the report:

  •     Permissions on the Calendar
  •     Delegates on the Calendar
  •     Free/Busy publishing information
  •     Direct Booking settings for the Mailbox or Calendar
  •     Total number of items in the Calendar folder

The following item-level checks are performed and logged in the report:

  •     No Organizer email address
  •     No Sender email address
  •     No dispidRecurring property (causes an item to not show in the Day/Week/Month view)
  •     Time existence of the dispidApptStartWhole and dispidApptEndWhole properties
  •     No Subject for meetings that occur in the the future or for recurring meetings (a warning is logged)
  •     Message Class check (a warning is logged)
  •     dispidApptRecur (recurrence blob) is checked for time on overall start and end times, not for exceptions
  •     Check for Conflict items in the Calendar
  •     Check for duplicate items, based on certain MAPI properties
  •     Check if over 1250 recurring meetings (a warning is logged) and 1300 recurring meetings (an error is reported); 1300 is the limit
  •     Check if you are an attendee and you became the Organizer of a meeting
  •     Check meeting exception data to ensure it is the correct size

[Above content is grabbed from Exchange Team Blog]

Download and references:

Download Link : http://www.microsoft.com/download/en/details.aspx?id=28786

Exchange Team Blog : http://blogs.technet.com/b/exchange/archive/2012/02/22/calcheck-the-outlook-calendar-checking-tool.aspx

Codeplex project: http://calcheck.codeplex.com/

 

 

{ 1 comment }

Show The Current Date & Time In A Cell in Excel Sheet

At times you may want to include current date & time in a excel sheet. How do you do that automatically?
2 functions help us to do that
  • Today() – Inserts current date
This formula will only update when the worksheet is recalculated or when you reopen the workbook. That’s usually not a problem since the date only changes once a day. Also, you may have to format the cell to give you your desired date format.
  • Now() – Inserts Current Date & Time

 

 
This formula gives you both the date and time in the same cell (i.e. 19-May-03 9:00pm), however, is less useful because the time in the cell won’t change until your worksheet recalculates or when you reopen your workbook. If you just want the cell to display the time only, you’ll have to change the number format by selecting Format, Cells, Number, Time, (select a desired time format), OK
{ 0 comments }

Breaking Administrator Password of Windows XP

As system administrators we could have received multiple calls from laptop/home users saying that they have forgotten the Local Administrator Password and ask us to crack.

While there are many third party hacking /crack tools on net, below article helped me to do that without any of those.

Here is the article which explains in simple way to reset the password… Hope it would be useful to you sometimes in your operations…

http://www.unp.me/f140/break-administrator-password-of-windows-xp-23706/

{ 0 comments }

This post talks about querying Active Directory Sites and subnets information from AD using Powershell. This script is helpful when you want to know subnets mapping to given site and servers lying in a site. This scrip doesn’t need much explanation since it is looking very straight forward. If you defer with me, please comment what part of script you want to understand. Also feel free to post if you would like to query any other information related to sites and services. Happy to help.

Code: Get-ADSites.ps1

[cmdletbinding()]            
param()            

$Sites = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Sites            

foreach ($Site in $Sites) {            

 $obj = New-Object -Type PSObject -Property (            
  @{            
   "SiteName"  = $site.Name;            
   "SubNets" = $site.Subnets;            
   "Servers" = $Site.Servers            
  }            
 )            

 $Obj            
}

 Output

{ 6 comments }

Powershell: Uninstall software on remote computer

Ok. It’s time to uninstall a application using powershell. This post is continuation to Powershell: Script to query softwares installed on remote computer where I discussed about procedure to query installed applications on remote computer without using Win32_Product WMI class. The one advantage with Win32_Product WMI class is it’s uninstall() function using which we can trigger uninstallation of softwares on local or remote computer.

In this post, I am going to provide a powershell script which provides same functionality as uninstall() function of Win32_Product WMI class. My code uses GUID of product to trigger the uninstallation by passing it to msiexec process. It also triggers the uninstallation in silent mode so no UI will appear for the user while performing the uninstallation.

Code goes here…

[cmdletbinding()]            

param (            

 [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
 [string]$ComputerName = $env:computername,
 [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Mandatory=$true)]
 [string]$AppGUID
)            

 try {
  $returnval = ([WMICLASS]"\\$computerName\ROOT\CIMV2:win32_process").Create("msiexec `/x$AppGUID `/norestart `/qn")
 } catch {
  write-error "Failed to trigger the uninstallation. Review the error message"
  $_
  exit
 }
 switch ($($returnval.returnvalue)){
  0 { "Uninstallation command triggered successfully" }
  2 { "You don't have sufficient permissions to trigger the command on $Computer" }
  3 { "You don't have sufficient permissions to trigger the command on $Computer" }
  8 { "An unknown error has occurred" }
  9 { "Path Not Found" }
  9 { "Invalid Parameter"}
 }

Note that you need my previous script(Get-InstalledSoftware.ps1) and the one discussed in this article(Uninstall-InstalledSoftware.ps1) to make this uninstallation works since the code discussed in this article depends on the output of Get-InstalledSoftware.ps1 script.

Usage:

  1. Run Get-InstalledSoftware.ps1 script and note the GUID of application that you want to uninstall.
  2. Run Uninstall-InstalledSoftware.ps1 -GUID <<uninstall application GUID here>>

Uninstall-InstalledSoftware.ps1 -GUID “{54D3F6B5-515B-45B8-8F41-FC4D26FEFFEA}”

Test this script in test environment before you try on any production computer. Any improper use of this script can trigger the uninstallation of multiple applications if handled improperly.

This can made as single liner…..

.\Get-InstalledSoftware.ps1 -ComputerName MyPC1 | ? {$_.AppName -eq “iTunes” } | .\Uninstall-InstalledSoftware.ps1

This triggers the installation of iTunes applications. Please note that at any point of time you are passing the output single computer to Uninstall-InstalledSoftware.ps1.

This is just a initial version. I will enhance it to accept multiple computers and multiple uninstallations at same time. I will also make it more robust to track the uninstallation process.

Hope this helps..

Your comments are welcome

{ 41 comments }

Tip: How to open a program as administrator

Hi Readers,

Before signing out today, I wanna share a quick tip that you can use in windows 7 or windows 2008 computers to open any program with administrator account. That means elevating a applications. You might want to ask, isn’t it easy to right click and say “Run As Administrator”?. Well, that option you won’t get for all applications. Give a try with Office applications if you want to observe this. In such cases, one need to open a elevated command prompt and launch the application from there which is somewhat time consuming. Instead you can use the below tip.

Hold Ctrl + Shift and then click on the application. It will automatically try to open in elevated mode.

Hope this helps and happy learning.

{ 0 comments }

Powershell: How to logoff remote computer

In my one of my recent posts, I talked about shutdown the remote computer using Powershell. Since then I started exploring the other options available in Win32_OperatingSystem class and figured out one more helpful method which can logoff users logged on remote computers.

This script helps you to logoff the remote user who is current loogged on the computer. I didn’t test this against terminal services environment where multiple users are logged in, but you can try this and let me know how it goes.

Code:

[cmdletbinding()]            
            
param (            
            
 [parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]            
 [string[]]$ComputerName = $env:computername,            
 [switch]$Force            
             
)            
            
begin {            
 $Username = $env:username            
             
 if($force) { $flag = 4 } else { $flag = 0 }             
 $comment  = "Logoff initiated by $Username using $($MyInvocation.InvocationName). Timeout is $Timeout"            
}            
            
process {            
 foreach($Computer in $ComputerName) {            
              
  Write-Verbose "Working on $Computer"            
  if(Test-Connection -ComputerName $Computer -Count 1 -ea 0) {            
   $OS  = Get-WMIObject -Class Win32_OperatingSystem -ComputerName $Computer            
   if( -not $OS.Win32ShutdownTracker(0, $comment, 0, $flag)) {            
    $Status  = "FAILED"            
   } else {            
    $Status  = "SUCCESS"            
   }            
  $OutputObj = New-Object -TypeName PSobject             
  $OutputObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Computer            
  $OutputObj | Add-Member -MemberType NoteProperty -Name LogOffStatus -Value $status            
  $OutputObj | Add-Member -MemberType NoteProperty -Name Timeout -Value $timeout            
  $OutputObj            
  }            
 }            
}            
            
end {            
}

Usage:

.\Logoff-Computer.ps1 -ComputerName MyPC1

{ 4 comments }