Posted in Scripting

How can I suspend a VM on VMware workstation via Powershell ?

As there is no API for Powershell in VMware worksation, we need to use the built-in tool called ‘vmrun.exe” This utility can be used to control virtual machines and allows the following operations: start (power on), stop (power off), reset (reboot), suspend (but allow local work to resume), pause (without interrupting), and unpause (continue) =====Suspend […]

How can I stop Server Manager from loading up at start-up on Windows Server 2012

If you would rather open the server manager manually, then follow these steps to prevent it auto starting: Go into Server Manager, click on the Manage menu item, then go to Server Manager Properties. Once there, simply tick on Do not start Server Manager automatically at logon. That will prevent it from starting up every time.

How can I create / name a folder with today’s date?

This is very handy if you are using scripts to generate daily logs and would like to put them in a folder with the current date. You can, of course, tweak the commands to suit your requirements:   for /F “tokens=1-4 delims=/ ” %%A in (‘date /t’) do ( set DateDay=%%A set DateMonth=%%B set DateYear=%%C […]

How can I search for all users that have the “Network Policy” set to false using PowerShell ?

If you need to search Active Directory to find users who currently have the “Network Access Permission” set to “Deny Access” on the Dial-in tab of their user account run this Powershell command: Get-ADUser -Filter {(mail -like “*”) -and (ObjectClass -eq “user”)} -Properties msNPAllowDialin | Where { $_.msNPAllowDialin -match “False” } | fl Name, msNPAllowDialin […]

How can I rename a file with todays date?

You can use this simple batch file to rename a file and append today’s date: set Day=%Date:~0,2% set Mth=%Date:~3,2% set Yr=%Date:~6,4% rename c:test.log test_%Day%-%Mth%-%Yr%.log

How can I pre-cache the Microsoft Office 2007 installation files?

Office 2007 uses the MSOCACHE folder as part of its core installation and functionality process. The folder is typically populated during the Office 2007 installation. However, to avoid network activity during installation, you can accomplish a pre-cache by performing the following steps. (Use caret brackets in place of the square brackets.) 1. From the network […]

How can I quickly check whether a folder contains a certain type of file?

You can pass the test-path cmdlet a wildcard expression to see whether any matching file exists. For example, to see whether a folder has any MP3 files, you can use test-path d:temp*.mp3

Where can I download Windows PowerShell?

On November 15, Microsoft released Windows PowerShell 1.0 (formerly codenamed Monad) for Windows XP Service Pack 2 (SP2) and Windows Server 2003, which you can download at here . A Windows Vista Release Candidate 1 (RC1) version is also available, with the final Vista version available by January 31, 2007. The download is less than […]

Windows XP Product Key Viewer

The Magical Jelly Bean Keyfinder is a freeware utility that retrieves your Product Key (cd key) used to install windows from your registry. It has the options to copy the key to clipboard, save it to a text file, or print it for safekeeping. It works on Windows 95, 98, ME, NT4, 2000, XP, Server […]

Free Windows Live Messenger Invites!!

Yes I have some MSN Messenger Live invites to give out. Want one? Its easy, just leave a comment and explain why you prefer Windows over Unix. I will pick the best replies and mail the invites out. Good luck !