Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Why a .\appcmd didn't work

Closed Thread
 
Thread Tools Display Modes
Old 09-28-2007   #1 (permalink)
Ger F.
Guest
 
Posts: n/a

Why a .\appcmd didn't work

Hello,

I have an command:
\Windows\system32\inetsrv\appcmd set config -section:anonymousAuthentication
/username:"" --password

This command at the Windows Command Prompt is OK.
But in Windows PowerShell this command gives a error message:
(Cannot find SITE object eith identifier "section:".)

Who knows why this command didn't work in Windows PowerShell?

--
I thank you in advance for a reaction.
Ger
 
Old 09-28-2007   #2 (permalink)
Marco Shaw
Guest
 
Posts: n/a

Re: Why a .\appcmd didn't work

Ger F. wrote:
Quote:

> Hello,
>
> I have an command:
> \Windows\system32\inetsrv\appcmd set config -section:anonymousAuthentication
> /username:"" --password
>
> This command at the Windows Command Prompt is OK.
> But in Windows PowerShell this command gives a error message:
> (Cannot find SITE object eith identifier "section:".)
>
> Who knows why this command didn't work in Windows PowerShell?
>
This is how PowerShell is interpreting your commands and passing them to
appcmd:

PS> ./echoargs appcmd set config -section:anonymousAuthentication /user
name:"" --password
Arg 0 is <appcmd>
Arg 1 is <set>
Arg 2 is <config>
Arg 3 is <-section:>
Arg 4 is <anonymousAuthentication>
Arg 5 is </username:>
Arg 6 is <--password>

Try this instead:
PSH> appcmd set config "-section:anonymousAuthentication" /username:""
--password

I'm not 100% how you should define that null for the username.

echoargs comes from PSCX (www.codeplex.com/powershellcx).

Marco


--
----------------
PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
 
Old 09-28-2007   #3 (permalink)
Brandon Shell
Guest
 
Posts: n/a

Re: Why a .\appcmd didn't work

Try this. I'm not sure if appcmd is .exe or .cmd... need to add the ext
&"\Windows\system32\inetsrv\appcmd.exe 'set' 'config'
'-section:anonymousAuthentication' '/username:""' '--password'"

You can use echoargs from PSCX to figure this out as well.


"Ger F." <GerF@xxxxxx> wrote in message
news:C793722A-AE5A-4076-8F47-170062674A92@xxxxxx
Quote:

> Hello,
>
> I have an command:
> \Windows\system32\inetsrv\appcmd set
> config -section:anonymousAuthentication
> /username:"" --password
>
> This command at the Windows Command Prompt is OK.
> But in Windows PowerShell this command gives a error message:
> (Cannot find SITE object eith identifier "section:".)
>
> Who knows why this command didn't work in Windows PowerShell?
>
> --
> I thank you in advance for a reaction.
> Ger
 
Old 09-28-2007   #4 (permalink)
Ger F.
Guest
 
Posts: n/a

Re: Why a .\appcmd didn't work

Hi Marco,
Your answer was OK, it works now correct now
Thanks a lot,
Ger
--

"Marco Shaw" wrote:
Quote:

> Ger F. wrote:
Quote:

> > Hello,
> >
> > I have an command:
> > \Windows\system32\inetsrv\appcmd set config -section:anonymousAuthentication
> > /username:"" --password
> >
> > This command at the Windows Command Prompt is OK.
> > But in Windows PowerShell this command gives a error message:
> > (Cannot find SITE object eith identifier "section:".)
> >
> > Who knows why this command didn't work in Windows PowerShell?
> >
>
> This is how PowerShell is interpreting your commands and passing them to
> appcmd:
>
> PS> ./echoargs appcmd set config -section:anonymousAuthentication /user
> name:"" --password
> Arg 0 is <appcmd>
> Arg 1 is <set>
> Arg 2 is <config>
> Arg 3 is <-section:>
> Arg 4 is <anonymousAuthentication>
> Arg 5 is </username:>
> Arg 6 is <--password>
>
> Try this instead:
> PSH> appcmd set config "-section:anonymousAuthentication" /username:""
> --password
>
> I'm not 100% how you should define that null for the username.
>
> echoargs comes from PSCX (www.codeplex.com/powershellcx).
>
> Marco
>
>
> --
> ----------------
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com
>
 
Old 09-30-2007   #5 (permalink)
Ger F.
Guest
 
Posts: n/a

Re: Why a .\appcmd didn't work

Hello Brandon,
Thank you very much for your helpfull answer.
Sorry for the delay, but I was install a new Windows Server 2008 and that
takes a lot of time.
Best regards, Ger
--

"Brandon Shell" wrote:
Quote:

> Try this. I'm not sure if appcmd is .exe or .cmd... need to add the ext
> &"\Windows\system32\inetsrv\appcmd.exe 'set' 'config'
> '-section:anonymousAuthentication' '/username:""' '--password'"
>
> You can use echoargs from PSCX to figure this out as well.
>
>
> "Ger F." <GerF@xxxxxx> wrote in message
> news:C793722A-AE5A-4076-8F47-170062674A92@xxxxxx
Quote:

> > Hello,
> >
> > I have an command:
> > \Windows\system32\inetsrv\appcmd set
> > config -section:anonymousAuthentication
> > /username:"" --password
> >
> > This command at the Windows Command Prompt is OK.
> > But in Windows PowerShell this command gives a error message:
> > (Cannot find SITE object eith identifier "section:".)
> >
> > Who knows why this command didn't work in Windows PowerShell?
> >
> > --
> > I thank you in advance for a reaction.
> > Ger
>
>
 
 
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Still searching for way to get Vista search to work: Why doesn't FilterFilesWithUnknownExtensions registry key work in Vista? Celegans Vista General 11 08-31-2007 09:04 AM
all cd's don't work, but dvd's still work Phil Vista hardware & devices 2 05-18-2007 09:35 AM
HP LaserJet 1010 don't work in Vista since Beta2 - Advanced 1384 Printing Support drivers for XP don't work Alexey Vista print fax & scan 2 10-18-2006 07:05 PM
Will all the programs that work on xp work on vista? exciter Vista General 14 10-06-2006 11:40 PM
IIS7 AppCmd & ASP.NET Website Synced Vista General 0 06-12-2006 05:36 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49