Script won't run on 2003 Server

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Brian (Brian_at_discussions.microsoft.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 11:51:03 -0800

I am executing the following script on Server 2003 and getting an
 error message on the Put statement saying access deinied. I am
 logged on as a domain admin. When I run the same script on my XP PC
 it works fine. Any idea why I'm getting an access denied on a 2003
 server?

Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer &
 "\root\cimv2") Set objNewPort = objWMIService.Get _
    ("Win32_TCPIPPrinterPort").SpawnInstance_

 objNewPort.Name = "IP_169.254.110.14"
 objNewPort.Protocol = 1
 objNewPort.HostAddress = "169.254.110.14"
 objNewPort.PortNumber = "9999"
 objNewPort.SNMPEnabled = False
 objNewPort.Put_

-
Thanks for the help!
Brian



Relevant Pages

  • Re: Help with Net::ftp not downloading
    ... download a set of files from my server to my local drive. ... getting any error messages, the script isn't performing. ... I added the error message trap, an lo, I get an error ... Web server, then 'use CGI' will help, otherwise you'll have ...
    (comp.lang.perl.misc)
  • Re: SMTPClient Message.Send Error - please help!!!
    ... prevent my script from failing... ... Maybe their smtp server is experiencing considerable load and that is ... - script is below the error message below... ... S> Service not available, closing transmission channel. ...
    (microsoft.public.dotnet.framework)
  • Re: Error 800703e6 CDO.Person
    ... Anything change on the server? ... >> Why are you using CreateObject instead of Server.CreateObject? ... >>> I am using asp script for enumerating mailboxes in certain OU. ... >>> and the error message: ...
    (microsoft.public.exchange.development)
  • Re: VB Script that searches a file for different text, with an app
    ... The script then needs to continue parsing the file for error conditions ... There could be multiple instances of that error message. ... There is/are 1 threadin total in the server that may be hung on ... Appreciate your time Pegasus, Here's what I have so far: ...
    (microsoft.public.scripting.vbscript)
  • Re: The folloing javascript code does not compile.
    ... Error message is that cc ... As Bruce said, this is a server side code error, which means that you are ... be script but why isn't <!-- taken to be script? ... The start tag of the comment is ignored in the script, ...
    (microsoft.public.dotnet.framework.aspnet)