Renaming Virtual Directories and Applications in IIS 7
IIS 7 providing a helpful command for renaming virtual directories and applications called appcmd.
Renaming Virtual Directory
- Open the command prompt with admin privilege | move to C:\Windows\System32\inetsrv
- Type appcmd list vdir to list all your virtual directories
- Type appcmd set vdir “<current virtual directory>” –path:/< new name>
Example: appcmd set vdir “my web/second” -path:/minute for renaming virtual directory “second” to “minute”
- Done
Renaming Applications
- Open the command prompt with admin privilege | move to C:\Windows\System32\inetsrv
- Type appcmd list app to list all your applications
- Type appcmd set vdir “<current virtual directory>” –path:/< new name>
Example: appcmd set app “my web/months” -path:/years for renaming application “months” to “Years”
- Done
PowerShell Scripts Part-1
Microsoft Windows PowerShell is the new command-line and scripting language for system administration. Unlike other scripting language such as VBscripts it’s very secure also provides built-in commands called cmdlets .
By default PowerShell does not allow to execute any scripts since it’s concerned about security. PowerShell provides four types of execution policies:
Restricted – Default policy it doesn’t allow to run scripts
Allsigned – Scripts must have signature
Remotesigned – Allow scripts from local computer, Scripts from remote computer need to be signed.(Script downloaded from internet must have signature)
Unrestricted– Allows all scripts(Not secure)
Use bellow cmdlet for assigning the execution policy
set-executionpolicy <policy name>
Example: set-executionpolicy remotesigned
Here are some useful scripts/cmdlets
Creating local user
$localuser = Read-Host ‘Enter User Account Name’
$password = Read-Host ‘Enter Password for’ $localuser
$description = Read-Host ‘Enter Description for’ $localuser
$computer = [ADSI]"WinNT://$env:computername,computer"
$user = $computer.Create("user", $localuser)
$user.SetPassword($password)
$user.SetInfo()
$user.Description = [String] $description
$user.SetInfo()
Map network drive
$share= $(New-Object -ComObject WScript.Network)
$share.MapNetworkDrive("s:", //<pc_name>/<share_name>)
Rename hard drive label
$hdrive = [wmi]"Win32_logicaldisk=’C:’"
$hdrive.VolumeName = "Windows"
$hdrive.Put()
Getting full list of WMI objects
Get-Wmiobject –list
Filter Win32 objects only:
Get-Wmiobject -list | where {$_.name -match "win32*"}
Checking Leap Year
[DateTime]::IsLeapYear(2008)
Running Programs as different user
start-process <processname> –LoadUserProfile –Credential ‘<user name>’
Will be back with next set…
How to Enable Windows 7 GodMode
GodMode is a hidden feature in Windows 7 as well as windows vista. By enabling this feature allows you to access all windows settings in a single place. It is a single folder that collects all of the control panel functions,interface customization,accessibility options etc..
Steps:
- Create a new folder
- Rename the folder to GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
- Then open it to show the GodMode window.
GodMode enabled..
My favorite Three Firefox addons
1. Adblock Plus
Adblock Plus allows you to regain control of the internet and view the web the way you want to. The add-on is supported by over forty filter subscriptions in dozens of languages which automatically configure it for purposes ranging from removing online advertising to blocking all known malware domains. Adblock Plus also allows you to customize your filters with the assistance of a variety of useful features, including a context option for images, a block tab for Flash and Java objects, and a list of blockable items to remove scripts and stylesheets.
2. Xmarks Bookmark and Password Sync
Xmarks is the #1 bookmarking add-on. Keep your bookmarks, passwords and open tabs backed up and synchronized across computers and browsers. Search smarter with website ratings and reviews displayed with your search results. It also support Internet Explorer, Safari (MacOS only), and Google Chrome
The easy way to download and convert Web videos from hundreds of YouTube-like sites.
This works also for audio and picture galleries.When you are on a page containing links to images or movies, you can download some or all of them at once. Moving the mouse over the items in the menu will highlights the links directly in the page to make sure they are the ones you want to pick up. It also allows you to download files one by one, so that you keep bandwidth to surf for other stuff to download.
Identify your SQL server version and edition
To check which version of SQL server running on your machine.
- Connect the SQL server by using SQL Management Studio and then Run the following statement
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
- You can see Version,Level,Edition as result
Example:
9.00.1399.06 | RTM | Enterprise Edition