This might be a bad idea. But this script helps at times when an service account is being locked out constantly, you need time to figure out how it is happening. I wrote this script and schedule to run every 5 minutes to scan my service account lockouts, unlock the account and send me an … Continue reading When your service account is being locked out constantly….
I had a requirement to find computer name from a list of IP addersses. I wrote the following vb script function for my requirement. I made it more generic function so any one can use it. Here it is. 'Function to find Hostname from IP address. To run this function, 'you have to be administrator … Continue reading VBScript: Find Hostname from a IP Address
I was running Outlook 2010 and running an Powershell script to access emails by sub folders and count them for a weekly report. The problem was script seems to failing during testing. Sometime I get list of emails displaying, other times it was nothing. I started my script with $outlook = new-object -com Outlook.Application $session … Continue reading Powershell: Outlook.Application access doesn’t work consistently
Every system admin gets request to send list of group members from all kinds of users. It’s very easy if you know how to search Internet (Bing! anyone). Long back I posted VBScript to list the group members. Check here: https://anandthearchitect.wordpress.com/2008/10/18/get-members-list-from-a-domain-group-by-vbscript/ While back I posted an blog to list the AD group members using DSQuery … Continue reading Power shell: How to list group members?
My Citrix XenApp farm runs with XenApp 5 on Windows Server 2008 64bit servers. I found a strange issue on few XenApp Servers goes to Zombie mode. The server is pingable and operational. No users connected to this server. If you have specific application points to this server, Users get this error message: It was … Continue reading Fixing Dead XenApp Servers automatically by script
I had a requirement to delete directories by wildcard. Unfortunately RMDIR User* will not work in command prompt. I found the answer in PowerShell. The following command delete a bunch of folders by wildcard selection. The following command deletes all folders starting with "2008*" under C:program FilesDBappLogs. get-childitem -path 'C:Program FilesDBappLogs' -filter 2008* … Continue reading How to Delete folders by wildcard search? Answer: use PowerShell
Let’s just say you want to get folder size of each home folder of the users. Or trying to see which sub folders are growing fast. I use the following three ways depending on my requirement. 1. Fantastic tool named Disk Usage v1.33 by Mark Russinovich: http://technet.microsoft.com/en-us/sysinternals/bb896651.aspx 2. VBScript of my own. Copy the following … Continue reading How to get folder size of each sub folders?
One of these wonderful days, I came across a need to map a network drive before I run a script. It’s a hassle to manually create the network drive mapping every time. This is because I was using different credentials to map the network drive. Then I put my mask, and yelled “This is the … Continue reading Map Network drive with different credentials in command line
Today I had to get the list of printer drivers installed on various servers. I wrote a quick and dirty script to get the printer list. If you want to use this, copy the following script text and paste it in Notepad. Save it as “PrinterList.vbs”. Run it as, C:> CSCript PrinterList.vbs <Your Server Name> … Continue reading VBScript: List installed printers list
If you looking to find a computer or server's OS type using VBScript, you can use my ready to use function as below. '///////////////////////////////////////' Function: FindOSType' Parameter: Computer Name' Purpose: This function return the OS name of the provided computer for all' Windows OS machines' ' Written by: Anand Venkatachalapathy (http://anandpv.spaces.live.com)'/////////////////////////////////////// Function FindOSType(ComputerName) 'Defining Variables … Continue reading Find OS Type using VBScript (ready to use VBScript Function, right here)