Search

Get-Website always returns full list of web sites by Andrey Magas

Closed
as External Help for as External

8
0
Sign in
to vote
Type: Bug
ID: 597787
Opened: 9/14/2010 9:31:52 AM
Access Restriction: Public
1
Workaround(s)
4
User(s) can reproduce this bug
I tried get info about 1 site using Get-Website and this cmd-let always returns full list of websites.
Details (expand)
How often does this happen?
Always Happens

Have you seen this problem before in this product?

I don't know if this issue existed previously
Reproduction Steps
Windows 2008 Web Edition,

PS IIS:\Sites> Get-Website -Name "Default Web Site"

Name             ID State     Physical Path                 Bindings
----             -- -----     -------------                 --------
Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot http *:80:
test             2    Started    C:\inetpub\test                http 192.168.0.202:80:test.com
gallery         3    Stopped    C:\inetpub\Gallery             http *:80:

PS IIS:\Sites> Get-Website

Name             ID State     Physical Path                 Bindings
----             -- -----     -------------                 --------
Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot http *:80:
test             2    Started    C:\inetpub\test                http 192.168.0.202:80:test.com
gallery         3    Stopped    C:\inetpub\Gallery             http *:80:


Expected Results
PS IIS:\Sites> Get-Website -Name "Default Web Site"

Name             ID State     Physical Path                 Bindings
----             -- -----     -------------                 --------
Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot http *:80:

PS IIS:\Sites> Get-Website

Name             ID State     Physical Path                 Bindings
----             -- -----     -------------                 --------
Default Web Site 1    Started    %SystemDrive%\inetpub\wwwroot http *:80:
test             2    Started    C:\inetpub\test                http 192.168.0.202:80:test.com
gallery         3    Stopped    C:\inetpub\Gallery             http *:80:


File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/15/2012 at 11:12 AM
Please file this item in the Connect site for IIS so that it gets routed to the IIS team.
Sign in to post a workaround.
Posted by Will Steele on 7/31/2011 at 4:53 AM
I was able to get the specific website name I needed by wrapping the name in wildcard characters:

get-website -name "*Default Web Site*"