Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - How is it possible to execute start-service and stop-service through a Web-interface?

Reply
 
Old 11-04-2007   #1 (permalink)
Alexander Vasilevsky


 
 

How is it possible to execute start-service and stop-service through a Web-interface?

Hi!

I want to cause PowerShell through ASP.Net app. Such commands as get-service
is caused without problems.
But start-service and stop-service is not executed. I think, it is related
to the privileges.

How is it possible to execute start-service and stop-service through a
Web-interface?
--
http://www.alvas.net - Audio tools for C# and VB.Net developers



My System SpecsSystem Spec
Old 11-04-2007   #2 (permalink)
Marco Shaw [MVP]


 
 

Re: How is it possible to execute start-service and stop-servicethrough a Web-interface?

Alexander Vasilevsky wrote:
Quote:

> Hi!
>
> I want to cause PowerShell through ASP.Net app. Such commands as get-service
> is caused without problems.
> But start-service and stop-service is not executed. I think, it is related
> to the privileges.
>
> How is it possible to execute start-service and stop-service through a
> Web-interface?
Something to try if you're not concerned about security:
http://ps1.soapyfrog.com/2007/01/24/...in-powershell/

Marco

--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

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

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec
Old 11-05-2007   #3 (permalink)
Alexander Vasilevsky


 
 

Re: How is it possible to execute start-service and stop-service through a Web-interface?

Hi Marco!

I can execute get-process, but can't execute start-service and stop-service
etc.

--
http://www.alvas.net - Audio tools for C# and VB.Net developers


"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> ???????/???????? ?
???????? ?????????: news:Oxz8SH1HIHA.5276@xxxxxx
Quote:

> Alexander Vasilevsky wrote:
Quote:

>> Hi!
>>
>> I want to cause PowerShell through ASP.Net app. Such commands as
>> get-service is caused without problems.
>> But start-service and stop-service is not executed. I think, it is
>> related to the privileges.
>>
>> How is it possible to execute start-service and stop-service through a
>> Web-interface?
>
> Something to try if you're not concerned about security:
> http://ps1.soapyfrog.com/2007/01/24/...in-powershell/
>
> Marco
>
> --
> Microsoft MVP - Windows PowerShell
> http://www.microsoft.com/mvp
>
> PowerGadgets MVP
> http://www.powergadgets.com/mvp
>
> Blog:
> http://marcoshaw.blogspot.com

My System SpecsSystem Spec
Old 11-05-2007   #4 (permalink)
Brandon Shell [MVP]


 
 

Re: How is it possible to execute start-service and stop-service through a Web-interface?

What service are you wanting the service to stop? A Service on a client or a
service on the web server? Actually, it wouldn't matter. They both would be
problematic.
1) for the client you cant use stop/start-service because the powershell
instance is running on the web server and you have no way to control they
client machine. Start/Stop are local calls not remote
2) for the server, normally you run as a low level user. If that is the case
the user will not be able to stop/start a service.

"Alexander Vasilevsky" <alvas@xxxxxx> wrote in message
news:fgktmc$ssp$1@xxxxxx
Quote:

> Hi!
>
> I want to cause PowerShell through ASP.Net app. Such commands as
> get-service is caused without problems.
> But start-service and stop-service is not executed. I think, it is related
> to the privileges.
>
> How is it possible to execute start-service and stop-service through a
> Web-interface?
> --
> http://www.alvas.net - Audio tools for C# and VB.Net developers
>
My System SpecsSystem Spec
Old 11-05-2007   #5 (permalink)
Alexander Vasilevsky


 
 

Re: How is it possible to execute start-service and stop-service through a Web-interface?

Dear Brandon!

Asp.net app hosted on the server. PowerShell hosted in asp.net app on the
this server.
I want start/stop service on the server from client machine.

You can help me?

--
http://www.alvas.net - Audio tools for C# and VB.Net developers


"Brandon Shell [MVP]" <a_bshell@xxxxxx> ???????/???????? ? ????????
?????????: news:759D74A1-0267-4B78-80D2-EDC591968C20@xxxxxx
Quote:

> What service are you wanting the service to stop? A Service on a client or
> a service on the web server? Actually, it wouldn't matter. They both would
> be problematic.
> 1) for the client you cant use stop/start-service because the powershell
> instance is running on the web server and you have no way to control they
> client machine. Start/Stop are local calls not remote
> 2) for the server, normally you run as a low level user. If that is the
> case the user will not be able to stop/start a service.
>
> "Alexander Vasilevsky" <alvas@xxxxxx> wrote in message
> news:fgktmc$ssp$1@xxxxxx
Quote:

>> Hi!
>>
>> I want to cause PowerShell through ASP.Net app. Such commands as
>> get-service is caused without problems.
>> But start-service and stop-service is not executed. I think, it is
>> related to the privileges.
>>
>> How is it possible to execute start-service and stop-service through a
>> Web-interface?
>> --
>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>>
>

My System SpecsSystem Spec
Old 11-05-2007   #6 (permalink)
Brandon Shell [MVP]


 
 

Re: How is it possible to execute start-service and stop-service through a Web-interface?

I would assume you are correct to think its privileges.

Make sure the user the ASP.NET app is running as is in the security ACL of
the service you want to stop/start.

Brandon Shell
---------------
Blog: http://www.bsonposh.com/
PSH Scripts Project: www.codeplex.com/psobject

AV> Dear Brandon!
AV>
AV> Asp.net app hosted on the server. PowerShell hosted in asp.net app
AV> on the
AV> this server.
AV> I want start/stop service on the server from client machine.
AV> You can help me?
AV>
AV> "Brandon Shell [MVP]" <a_bshell@xxxxxx> ???????/???????? ?
AV> ???????? ?????????:
AV> news:759D74A1-0267-4B78-80D2-EDC591968C20@xxxxxx
AV>
Quote:
Quote:

>> What service are you wanting the service to stop? A Service on a
>> client or
>> a service on the web server? Actually, it wouldn't matter. They both
>> would
>> be problematic.
>> 1) for the client you cant use stop/start-service because the
>> powershell
>> instance is running on the web server and you have no way to control
>> they
>> client machine. Start/Stop are local calls not remote
>> 2) for the server, normally you run as a low level user. If that is
>> the
>> case the user will not be able to stop/start a service.
>> "Alexander Vasilevsky" <alvas@xxxxxx> wrote in message
>> news:fgktmc$ssp$1@xxxxxx
>>
Quote:

>>> Hi!
>>>
>>> I want to cause PowerShell through ASP.Net app. Such commands as
>>> get-service is caused without problems.
>>> But start-service and stop-service is not executed. I think, it is
>>> related to the privileges.
>>> How is it possible to execute start-service and stop-service through
>>> a
>>> Web-interface?
>>> --
>>> http://www.alvas.net - Audio tools for C# and VB.Net developers

My System SpecsSystem Spec
Old 11-15-2007   #7 (permalink)
Alexander Vasilevsky


 
 

Re: How is it possible to execute start-service and stop-service through a Web-interface?

Yes, ASP.Net and service users is different. Can me help Impersonation?

http://www.alvas.net - Audio tools for C# and VB.Net developers


"Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> ???????/???????? ?
???????? ?????????: news:29d4f64621908c9edd9b10672c8@xxxxxx
Quote:

>I would assume you are correct to think its privileges.
> Make sure the user the ASP.NET app is running as is in the security ACL of
> the service you want to stop/start.
>
> Brandon Shell
> ---------------
> Blog: http://www.bsonposh.com/
> PSH Scripts Project: www.codeplex.com/psobject
>
> AV> Dear Brandon!
> AV> AV> Asp.net app hosted on the server. PowerShell hosted in asp.net app
> AV> on the
> AV> this server.
> AV> I want start/stop service on the server from client machine.
> AV> You can help me?
> AV> AV> "Brandon Shell [MVP]" <a_bshell@xxxxxx> ???????/???????? ?
> AV> ???????? ?????????:
> AV> news:759D74A1-0267-4B78-80D2-EDC591968C20@xxxxxx
> AV>
Quote:
Quote:

>>> What service are you wanting the service to stop? A Service on a
>>> client or
>>> a service on the web server? Actually, it wouldn't matter. They both
>>> would
>>> be problematic.
>>> 1) for the client you cant use stop/start-service because the
>>> powershell
>>> instance is running on the web server and you have no way to control
>>> they
>>> client machine. Start/Stop are local calls not remote
>>> 2) for the server, normally you run as a low level user. If that is
>>> the
>>> case the user will not be able to stop/start a service.
>>> "Alexander Vasilevsky" <alvas@xxxxxx> wrote in message
>>> news:fgktmc$ssp$1@xxxxxx
>>>
>>>> Hi!
>>>>
>>>> I want to cause PowerShell through ASP.Net app. Such commands as
>>>> get-service is caused without problems.
>>>> But start-service and stop-service is not executed. I think, it is
>>>> related to the privileges.
>>>> How is it possible to execute start-service and stop-service through
>>>> a
>>>> Web-interface?
>>>> --
>>>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>
>

My System SpecsSystem Spec
Old 11-15-2007   #8 (permalink)
Brandon Shell [MVP]


 
 

Re: How is it possible to execute start-service and stop-service through a Web-interface?

I didnt mean the account the service runs as, I mean the ACL of the service
it self.

"Alexander Vasilevsky" <alvas@xxxxxx> wrote in message
news:fhirur$6fo$1@xxxxxx
Quote:

> Yes, ASP.Net and service users is different. Can me help Impersonation?
>
> http://www.alvas.net - Audio tools for C# and VB.Net developers
>
>
> "Brandon Shell [MVP]" <a_bshell.mask@xxxxxx> ???????/???????? ?
> ???????? ?????????: news:29d4f64621908c9edd9b10672c8@xxxxxx
Quote:

>>I would assume you are correct to think its privileges.
>> Make sure the user the ASP.NET app is running as is in the security ACL
>> of the service you want to stop/start.
>>
>> Brandon Shell
>> ---------------
>> Blog: http://www.bsonposh.com/
>> PSH Scripts Project: www.codeplex.com/psobject
>>
>> AV> Dear Brandon!
>> AV> AV> Asp.net app hosted on the server. PowerShell hosted in asp.net
>> app
>> AV> on the
>> AV> this server.
>> AV> I want start/stop service on the server from client machine.
>> AV> You can help me?
>> AV> AV> "Brandon Shell [MVP]" <a_bshell@xxxxxx> ???????/????????
>> ?
>> AV> ???????? ?????????:
>> AV> news:759D74A1-0267-4B78-80D2-EDC591968C20@xxxxxx
>> AV>
Quote:

>>>> What service are you wanting the service to stop? A Service on a
>>>> client or
>>>> a service on the web server? Actually, it wouldn't matter. They both
>>>> would
>>>> be problematic.
>>>> 1) for the client you cant use stop/start-service because the
>>>> powershell
>>>> instance is running on the web server and you have no way to control
>>>> they
>>>> client machine. Start/Stop are local calls not remote
>>>> 2) for the server, normally you run as a low level user. If that is
>>>> the
>>>> case the user will not be able to stop/start a service.
>>>> "Alexander Vasilevsky" <alvas@xxxxxx> wrote in message
>>>> news:fgktmc$ssp$1@xxxxxx
>>>>
>>>>> Hi!
>>>>>
>>>>> I want to cause PowerShell through ASP.Net app. Such commands as
>>>>> get-service is caused without problems.
>>>>> But start-service and stop-service is not executed. I think, it is
>>>>> related to the privileges.
>>>>> How is it possible to execute start-service and stop-service through
>>>>> a
>>>>> Web-interface?
>>>>> --
>>>>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>>
>>
>
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
stop and start windows update service VB Script
"Dependency service or group failed to start" and unable to start Diagnostic Policy Service manually Vista General
Problem with a Service that Fails to Start (Bonjour Service) Vista General
NET START STOP Service Command Line Vista General


Vista Forums 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 Ltd

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