wmi call on win2k3 server : DOTNET
This is a discussion on wmi call on win2k3 server within the DOTNET forums in Framework and Interface Programming category; hi, local wmi call work that way - even if you have the required privilege (SeShutdownPrivilege) you have to manually request it - usually upon connecting to the wmi service. have a look at: http://www.leastprivilege.com/PermaL...3-1c691312798e --- Dominick Baier - DevelopMentor http://www.leastprivilege.com nntp://news.microsoft.com/microsoft.public.dotnet.framework.wmi/<29db3f3d.0409140222.2f6cfc73 @ posting.google.com > I have a c# application which, amongst other things, requires the shutdown/Reboot of the computer on which it runs. I have found the very stadnard code for this which uses a wmi call from the System.Management .net library. This works perfectly on Windows 2000 machines but when I try to run it on Windows Server ...
| DOTNET Discussion forums related to Microsoft Dot net technologies, CSharp and other related items |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| local wmi call work that way - even if you have the required privilege (SeShutdownPrivilege) you have to manually request it - usually upon connecting to the wmi service. have a look at: http://www.leastprivilege.com/PermaL...3-1c691312798e --- Dominick Baier - DevelopMentor http://www.leastprivilege.com nntp://news.microsoft.com/microsoft.public.dotnet.framework.wmi/<29db3f3d.0409140222.2f6cfc73@posting.google.com > I have a c# application which, amongst other things, requires the shutdown/Reboot of the computer on which it runs. I have found the very stadnard code for this which uses a wmi call from the System.Management .net library. This works perfectly on Windows 2000 machines but when I try to run it on Windows Server 2003 it returns an Exception from the Management object of 'Privilege not held'. I have checked all the Local Security Policy settings for the logged-on user and they all seem ok (e.g. Shutdown m/c privilege etc...). I have scoured long and hard around newsgroups to no evail. I am now totally stumped! btw, all machines are .net Framework 1.1 (I thought maybe it was a Framework v1 bug but alas no fix when they were all set to run v1.1) Any advice hugely appreciated. [microsoft.public.dotnet.framework.wmi] |
|
#2
| |||
| |||
| Dominick, True, this can be done by setting ManagementScope.Options.EnablePrivileges to 'true', unfortunately it no longer works using System.Management .NET v1.1 SP1. Works correctly using v1.1 though. Willy. "Dominick Baier" <dotnet@leastprivilege.com> wrote in message news:uP0Ds0mmEHA.704@TK2MSFTNGP09.phx.gbl... > hi, > > local wmi call work that way - > > even if you have the required privilege (SeShutdownPrivilege) you have to > manually request it - usually upon connecting to the wmi service. > > have a look at: > > http://www.leastprivilege.com/PermaL...3-1c691312798e > > > > --- > Dominick Baier - DevelopMentor > http://www.leastprivilege.com > > > nntp://news.microsoft.com/microsoft.public.dotnet.framework.wmi/<29db3f3d.0409140222.2f6cfc73@posting.google.com > > > I have a c# application which, amongst other things, requires the > shutdown/Reboot of the computer on which it runs. > > I have found the very stadnard code for this which uses a wmi call > from the System.Management .net library. > > This works perfectly on Windows 2000 machines but when I try to run it > on Windows Server 2003 it returns an Exception from the Management > object of 'Privilege not held'. I have checked all the Local Security > Policy settings for the logged-on user and they all seem ok (e.g. > Shutdown m/c privilege etc...). I have scoured long and hard around > newsgroups to no evail. I am now totally stumped! > > btw, all machines are .net Framework 1.1 (I thought maybe it was a > Framework v1 bug but alas no fix when they were all set to run v1.1) > > Any advice hugely appreciated. > > [microsoft.public.dotnet.framework.wmi] |
![]() |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why am I getting System.DllNotFoundException err on win2K3 server? | usenet | CSharp | 7 | 08-22-2007 03:40 PM |
| Stop sending mails from Win2K3 Server | usenet | Inetserver | 0 | 07-28-2006 04:22 AM |
| wmi call on win2k3 server | usenet | DOTNET | 2 | 09-15-2004 09:24 AM |
| exc2k on win2k3 server | usenet | Microsoft Exchange | 2 | 06-14-2004 06:07 AM |
| Problem with transactions from Win2k app server to Win2k3 SQL Server | usenet | DOTNET | 7 | 12-10-2003 03:19 PM |




