by TechiBee
on December 1, 2009
Many people aren’t aware of this beautiful feature introduced with Windows 2000 and continuing in it’s successors. To get a better sense of what it is, lets a take a example. Your CPU is spiking to 100% at mid nights and you got the task of identifying the root cause. The spike is very sporadic in nature and lasts for very short time. How will you deal with this situation to see which process is taking high CPU?. Here comes the benefit of WMI event notifications. You can trigger a monitoring in your system using WMI event notifications to monitor the CPU utilization and do a process dump when it touches the monitored value. Task is done and you don’t need to spend time in monitoring manually. This is just a example only and you can adopt this to get alerted when a process starts or ends.
I may not be good at explaining the real use of WMI event notifications but I have found beautiful blog entry which explained this in detailed. Read it to become smart administrator.
Trevor Sullivan’s Tech Room
You can also refer to Microsoft Technet Site Article
Happy Learning..,
Sitaram Pamarthi.
{ }
by TechiBee
on December 1, 2009
This small piece of code helps you to know when a active directory user has changed his password last time. Use your own inventions to make the output appear the way you want.
$user = “user1”
$searcher=New-Object DirectoryServices.DirectorySearcher
$searcher.Filter=”(&(samaccountname=$user))”
$results=$searcher.findone()
$changedtime = [datetime]::fromfiletime($results.properties.pwdlastset[0])
write-host -b blue -f red The user, $user has changed password last time at $changedtime
It will be more easy if you have Quest PowerShell Cmdlets for active roles installed in your PC. Download it from Quest site and install on your machine and execute the below oneliner in Quest powershell window.
Get-QADUser user1 | ft displayname, PasswordLastSet
Happy Learning..,
Sitaram Pamarthi
{ }
by TechiBee
on November 27, 2009
I recently authored a powershell script to get ILO version and Server model remotely. You can get it from here https://techibee.com/tips/powershell-script-to-get-ilo-version-and-server-model-remotely/572
I never thought that it possible. It’s really awesome and many people wanted to find out this information. I thought of giving details about the procedure to my blog readers and hence writing here. If you want the Unix based script straight away go to Nacho tech Blog. You can continue here if you want to understand the logic behind the script.
If a machine has ILO enabled, it listens on the port number 17988. It’s the port used for mapping virtual devices. Now you need to scan your network for list of machines which are listening on this port. For this purpose you can use nmap(a unix based utility which has it’s flavor in Windows also). This is very cool utility with little bit of complex options J. The simple example I can provide you scan a network for port 17988 is, “nmap -n -P0 -p 17988 -oG -S 10.10.10.0/24”. AFAIK, nmap uses broad cast when you ask it to scan a network range — correct me if I am wrong. Based on my assumption, you should run nmap from a host where broadcast is allowed to all your VLANS.
Above process returns the list of hosts which are listening on given port. The next step is, fetching the ILO details from IPs which are listening on this port. The script uses a utility called curl (not sure of windows equivalent version) which connects to http://ip-listening-on-port-17988/xmldata?item=All and fetches a XML file. This doesn’t require any authentication to server. The returned XML file contains the Server Serial number, IP address of ILO, Server Model and ILO version details. Using serial number you can easily find out the server name if you have proper inventory. If you don’t have this data, then go and check the serial numbers of server manually. Hey!…I don’t want you to that much hard work. You know?, you can query serial number of a windows machine remotely using WMIC. Use the below command for this purpose.
C:>wmic /node:remotehost bios get serialnumber
SerialNumber
GFEDCBA
C:>
If you are a modern administrator and want to use powershell, the see my blog post.
This completes the task.
Happy Learning..,
Sitaram Pamarthi
{ }
by TechiBee
on November 27, 2009
If you want to log all the commands that you are executing in Exchange 2007 management shell to eventviewer, use the below registry key. As a result of this, all the commands you are executing from Exchange Shell will be logged to eventviewer and you can refer them whenever you want. This way we can keep track of what changes we are doing on day-to-day basis.
set-itemproperty HKLM:SOFTWAREMicrosoftPowerShell1PowerShellSnapInsMicrosoft.Exchange.Management.PowerShell.Admin -Name
LogpipelineExecutionDetails -value 1
Happy Learning..,
Sitaram Pamarthi
{ }
by TechiBee
on November 27, 2009
If you want to log all the commands executing through powershell to a text file, you can use “strat-transcript” cmdlet
Usage:
Start-Transcript c:your-folder-pathpslogging.txt
This starts logging all the commands you execute from powershell window to text file. This is very help when you are making critical changes.
{ }
by TechiBee
on November 27, 2009
This post is mainly concerned about the steps required for enabling CAS proxying in Exchange 2007. Before explaining the configuration part, I will give you the scenario where I am configuring the CAS proxying.
Environment:
I have two sites, SiteA and SiteB. Both the sites are having MBX and CAS(2) servers.
CAS1 server(SiteACas1) in SiteA is published to Internet.
If a user whose mailbox in siteB mailbox server tries to open his mailbox through OWA from internet, his request goes to SiteACas1 server and he will be get below error.
Error: Outlook Web Access is not available. If the problem continues, contact technical support for your organization and tell them the following: There is no Microsoft Exchange Client Access server that has the necessary configuration in the Active Directory site where the mailbox is stored.
To resolve these errors, follow the below steps.
Configuration:
- Enable integrated authentication on Cas1SiteB and Cas2SiteB servers.
Set-OwaVirtualDirectory -Identity “Cas1SiteBowa (Default Web Site)” -WindowsAuthentication $true
Set-OwaVirtualDirectory -Identity “Cas2SiteBowa (Default Web Site)” -WindowsAuthentication $true
- Set the internal URL on both the CAS servers in siteB
set-OwaVirtualDirectory -Identity “Casd1SiteBOWA (Default web site)” -InternalUrl https://Cas1SiteB.local.com/owa
set-OwaVirtualDirectory -Identity “Casd2SiteBOWA (Default web site)” -InternalUrl https://Cas2SiteB.local.com/owa
You are all set here, try accessing your siteB mailbox from CAS1SiteA OWA URL. It should work now.
What else I need to read to understand Proxying and Redirection better:?
TechNet [http://technet.microsoft.com/en-us/library/bb310763.aspx]
Msexchangeteam posts [One, two, and three]
Post here if you need any clarifications or have any questions.
Happy Learning,
Sitaram Pamarthi
{ }
by TechiBee
on November 26, 2009
Many analysis are saying that Adsence blocks placed in middle of blogger post performing well and earning good amounts to the bloggers. To fill my pockets as well, I tried placing the adsense block after reading one blog post entry and in vain, I tried several other also…still failed. I have read many posts from other bloggers about placing Adsence advertisement in middle of post but none of them worked straight forward — I think they are stale. After some struggle, I could able to sort-out the process.
So, follow the below steps if you want to see adsense blocks in middle of your post.
- Prepare your adsense code — Get adsense code from your adsense account and convert it using
blog-ad-converter to make it compatible with CSS.
- Logon to blogger and select the layout option and from there “edit HTML” option.
- Very important step here is to backup your template. Don’t miss to do this as it saves your time in case if you want to revert (who knows, my procedure also might fail for you)
- Select the check box “Expand widget template” and search for the tag “<data:post.body/>” and replace with below code.
<div expr:id='”aim1″ + data:post.id’></div>
<div style=”clear:both; margin:10px 0″>
<!– Remove this line and place your Your converted AdSense code here –>
</div>
<div expr:id='”aim2″ + data:post.id’>
<data:post.body/>
</div>
<script type=”text/javascript”>
var obj0=document.getElementById(“aim1<data:post.id/>”);
var obj1=document.getElementById(“aim2<data:post.id/>”);
var s=obj1.innerHTML;
var r=s.search(/x3C!– adsense –x3E/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>
- Save your template and check your blog. It should display the ads now.
Enjoy and Happy blogging…
[Source]
{ }
by TechiBee
on November 25, 2009
Many newbies don’t like the option of navbar in their blogspot.com. I too agree that blog will look ugly if navbar is present.
Follow the below steps if you want to remove navbar.
- Logon to blogger.com with your ID
- Click of layout option of your blog and choose “edit HTML” option inside that.

- Place the below piece of code before the <body> tag like shown below.
#navbar-iframe {
display: none !important;
}
This completes the task and enjoy navbar less blog 
{ }
by TechiBee
on November 23, 2009
The famous Indian techknowlegy site, labnol has announced a giveway offer for it’s readers. HP is going to present wireless printers to the three winners, so hurry up and grab your printer, if you are luckey enough! 
Visit this labnol link to get more details about this offer.
{ }
by TechiBee
on November 22, 2009
If you want to get your hands into the new Google Chrome OS, here you go.
Download the VMDK file(compatible with Vmware Server/workstation/fusion) from here and setup your own instance.
Below are the some of interesting notes about Google OS [ Courtesy : Manan’s Blog].
- It will be launched next year (they wanted to cash in on Microsoft’s PDC09. Cheapos!)
- It’s ONLY meant for Netbooks.
- The OS looks exactly like the Chrome browser.
- It’ll be locked to the hardware, like Apple the OS will come bundled on Netbooks.
- It is an Open Source project and bits are available for developers now.
- It is based on Debian. It’s basically just another Linux distro.
- Everything you do will be stored online. Notes and documents will be synced to Google Docs.
- No native applications.
- The current build can be compiled and installed on any machine.
- An App store is likely & no word on weather it will support Android apps, nothing certain but maybe.
At present there are not much application available in Google OS to play with. But look like developers already started their work to bring their apps Chrome compatible. The thing I like abou this is, you need to use your gmail ID for login(I think Google Apps IDs also will work, but haven’t tried) and it becomes one dash board for all google realted services.
Write in comments section if you find any other interesting news about Google OS.
{ }