I\'m writing a PowerShell script to perform certain administrative functions in IIS 7.5.
import-module WebAdministration
In some cases I kn
Try this
$app = get-webapplication -name 'MyApp'
foreach($a in $app)
{
$a.Attributes[0].Value;
}
This will give you all the names of the Web Applications, sometimes you can have more than 1 name for a single Web Applications.
For more information see the link
http://nisanthkv.blog.com/2012/07/06/name-of-web-applications-using-powershell/
Hope it helps..