Script to disable SNMP for all mapped printers

I'm looking for a script to disable SNMP on all printers mapped to a single computer.
I'm fairly new to scripting and I'm having troubles finding if this is even possible. 
We've been going through and disabling SNMP on a few hundred printers, essentially breaking printers already mapped for thousands of users. Re-enabling SNMP is not an option. 
The only scripts I've been able to find require you to specify the printer port and the computer name. 
Basically, I need a script to say "disable SNMP on all printers". 
I also played around with the following registry entry, but it did not disable SNMP: 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print
New DWORD Value.
SNMPLegacy
Set value 1.
I can have the script pushed at login, so as long as it works on a single computer, without needing to specify the port that requires a change, it should work without a hitch. 
I really appreciate any advice you guys may have. 

I think this PowerShell code should do the trick.  You can translate it to VBScript if needed (since it's just using WMI, both are fully capable of getting the job done).
Get-WmiObject -Class Win32_TCPIPPrinterPort -Filter 'SNMPEnabled = True' |
ForEach-Object {
$_.SNMPEnabled = $false
$_.Put() | Out-Null
Edit:  Oddly enough, the MSDN documentation on Win32_TCPIPPrinterPort says that the SNMPEnabled property should be read-only, but I just tested this code on my Windows 7 machine and it worked fine.
If, for some reason, you can't modify this through WMI, you can do it directly in the registry:
Get-ChildItem -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports' |
Set-ItemProperty -Name 'SNMP Enabled' -Value 0

Similar Messages

  • How can I keep lion from generating .DS_Store files on windows network partitions, but not disable it for all network partitions?

    How can I keep lion from generating .DS_Store files on windows network partitions, but not disable it for all network partitions?  I am fimilar with changing the setting for all network partitions(defaults write com.apple.desktopservices DSDontWriteNetworkStores true), but that is undesirable when I connect my laptop to my home network. A preferable solution would be where I could control the writing of these files based on disk format (NTFS vs HFS+).

    Go to MacUpdate or CNET Downloads and search for ds_store. There are numerous utilities for preventing them from being transferred to Windows systems.

  • SNR License Issue. How Can I Disable SNR for all Users?

    Hi,
    I Have an issue with SNR on CUCM 10.5 and with assignement of license type
    I have a cluster with 400 users.
    200 users use ip phone 3905 and should be use an Essential License.
    When system check for assignement of license type , itassign a Basic License instead of an Essential License, because it see that users have SNR Enabled.
    All users in my system have SNR enabled, and I can not disable it. All my user have Enable Mobility unchecked, and all my phone have Device Mobility Off, but system however see SNR enable.
    How can i disable SNR for all users? This is a feature that client don't need.
    I dont' have a sufficent number of licenses for support all 3905 in Basic License.
    thanks for help.
    Andrea

    Well actually, Mobile Identity wouldn't apply to a 3905 unless those phones had another line on a Dual-Mode device like an iPhone or Android phone.  So unless you have either of those in your system you can scratch that idea.  Someone else may chime in here and try to help a bit more as RD/RDP are the main SNR culprits.

  • CF10 enterprise - how to disable cfexecute for all sites (sandbox)

    Hello,
    I have a new CF10 server which I will be using as shared hosting for my clients.
    I would like to disable the following tags and functions globally:
    TAGS
    CFCONTENT
    CFFILE
    CFDIRECTORY
    CFEXECUTE
    CFOBJECT
    CFREGISTRY
    FUNCTIONS
    GetProfileString
    SetProfileString
    CreateObject
    I know in CF10 Standard I can block these for all sites using 'resource security', this will stop these tags from running at all.
    In CF10 Enterprise I have the option to create multiple sandboxes, but is it possible to create one global sandbox for all sites?
    My directory structure looks like:
    D:\sites\site1
    D:\sites\site2
    D:\sites\site3
    Can I create a sandbox disabling the above tags and functions just for D:\sites and all subfolders?
    I have tried but it does not seem to work - I have a sandbox setup for D:\sites with the above tags and functions disabled, but using a test script I can still use cfexecute in site1 to execute netstat.
    I do not wish to create a sandbox for each site as when new sites are added I would need to manually add a sandbox each time.
    If anyone has any ideas it would be most appreciated.
    Cheers
    Luke
    ( I have asked this in a different place on the CF forums as got no response, i think because I placed it in the wrong place. Sorry if this double post upsets anyone but I need some help!)

    D:\sites\site1
    D:\sites\site2
    D:\sites\site3
    If you define the sandbox to sites folder, then the settings also apply to sub-directories (as the sub directories will inherit the property from parent).
    It is working at my end perfectly fine.
    HTH
    Thanks
    VJ

  • How to disable SNMP for 10.8.6

    MAC OS 10.8.6 using Xerox MFP's shows errors on OS 10.9 WS need to know how to disable SNMP on server side.

    J.Lan wrote:
    I try to install apache+php+mysql on my laptop, but php do not work. Seems like the problem is about the libssl file.
    When I try to check the php version with the command:
    php -v
    the system returns:
    dyld: Library not loaded: @loader_path/../lib/libssl.dylib
      Referenced from: /usr/lib/libpq.5.dylib
      Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8
    Trace/BPT trap: 5
    So how to update the version of libssl file?
    You have installed some 3rd party versions of both php and libpq.5.dylib. Once you go down that road, you have to keep it all up to date yourself.

  • Script to "Reset size" for all images in a RoboHelp project

    New UI. Quick fix to pull new screenshots is hampered by the size constraints of graphics.
    Is there a (third party or built in) script that will reset size for all the images in a RoboHelp HTML project?
    RH8, RoboHelpHTML bulished as WebHelp.
    PS the filter in Adobe Forums doesn't allow me to limit the search to RoboHelp HTML and WebHelp; I don't have any other Adobe products, so all the hits don't apply.

    Thanks for this script!
    What needs to be done to convert a .jsx into an .exe executable that I can add to the RH Toolbox (pod) and run it in a project on my terms, rather than import into the project so it runs (whenever I compile?)
    What is the ReSize tool for that already exists in the toolbox?

  • Lenovo Yoga disables WiFi for all devices

    I have a Lenovo Yoga 2 that connects fine via LAN cable, but when i disconnect and try to use WiFi it disables my wireless router for all devices.  The wireless router works fine for windows phones, android phones and other laptops.  The Yoga disables WiFi every time it connects - is there some setting i can change to fix this?  how do i diagnose what is going on?  I've checked Ipconfig /all but it looks normal.  Any ideas?  thanks

    Sounces like the network is overloaded, or there's interference.
    Try ethernet.

  • Script to disable Client for Microsoft Networks and File and Print Sharing for Microsoft Networks

    Hi, I am trying to find a way of using a batch file or vbscript to disable Client for Microsoft Networks and File and Print Sharing for Microsoft Networks on a Network Interface Controller.
    I've done some searching on the internet and I can see some suggestions to locate the Setting ID of the NIC and then remove the value from the "Bind" string under "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Linkage" and "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Linkage"
    I tried this but it didn't seem to uncheck itself from the NIC properties under NCPA.cpl
    Can someone help me? 

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/b0407073-07bc-462b-9de9-7295be5fa183/disable-file-and-printer-sharing-for-mircorosoft-networks?forum=csharpgeneral
    ¯\_(ツ)_/¯

  • Run Script Once through Group for All users

    Hello Everyone,
    We have 4 forests with one domain each having forest trusts. I want to run a script only once on all the windows 7 machines in all the domains.
    I have created the script and saved it in the .bat. how can i go ahead and do this.
    Need your help.
    Thanks in Advance

    Hello Everyone,
    We have 4 forests with one domain each having forest trusts. I want to run a script only once on all the windows 7 machines in all the domains.
    You need to apply your script 4 times since you have 4 domains. Just use WMI filters to apply the GPO on Windows 7 machines only. 
    Filtering Group Policy to Windows 7 Computers
    Mahdi Tehrani   |  
      |  
    www.mahditehrani.ir
    Please click on Propose As Answer or to mark this post as
    and helpful for other people.
    This posting is provided AS-IS with no warranties, and confers no rights.
    How to query members of 'Local Administrators' group in all computers?

  • Script to change language for all  style lables in one click

    Hello,
    We are a dutch pre press company and often we get (English or French or German) books that are translated into Dutch. And often the copublisher has created documents with 80+ stylelables. It is quite a pain to change all stylelables one by one into Dutch (for dictionary and correct hypenation). Quark has an option to save a document as multi language or singe language. With the last option the programme asks for the desired language and all stylelables are immediately changed to (in my case) Dutch. That works great. Maybe someone out there has a script to achive the same in Indesign (5 or 5.5?) Thanks in advance!
    kind regards
    Peter

    Hi Selva,
    I have been trying for a long time to change the paragraph composer of all paragraph styles in a document, say from Adobe Paragraph composer to Adobe single-line composer. Nothing goes. Do you know how I can do that? I work with the french version and the composers are named: Compositeur de paragraphe Adobe and Compositeur ligne simple Adobe. The following works for a paragraph style if i refer explicitely to its name. But then, I don't gain much. So I want to find a way to change ALL paragraph styles at once. Your help would be great.
    var myDoc = app.activeDocument;
    var myPstyle = myDoc.paragraphStyles.item("Indents");
    myPstyle.composer = "Compositeur ligne simple Adobe";
    Thanks in advance.
    Diane

  • Script to Grant Role for All User Objects.

    Hi DBAs,
    I have created a select_only role. I need a script to populate that role with all user_objects belonging to one person and eventually grant that role to another person. Perhaps a dynamic sql.
    Please help.
    Thanks
    -Samar-

    Samar,
    Please see if the following documents help.
    Note: 18080.1 - Script to Create Roles
    Note: 174138.1 - How to Tranfer all Roles and Grants to Another Database
    Note: 729428.1 - Script to create roles & apply grants from database A to B
    Regards,
    Hussein

  • How to disable bluetooth for all devises except mouse and keyboard on Mac pro OS X 10.9.2

    i have Apple Magic mouse and Apple wireless keyboard, it is connected and work fine, but the policy in the company not allowing bluetooth devices such as mobile phones and computers to be connected by bluetooth, is there any option to do so?

    There is no audio line input on your Mac, get a USB interface, get one that is specified for guitars.

  • How can I disable javascript in Firefox 30 for all users on my Solaris 10 x86 box?

    I have a Solaris 10 box in a secure environment (no Internet) with Firefox 30 installed. I need to lock javascript in a disabled state for all users. I realize each individual user can toggle javascript with about:config, but that is only a per/user activity. I want to set the value of javascript.enabled to false for all users. Additionally, no user should be able to modify this setting.
    Is there a location with a config or prefs file that will affect all users?

    Try: http://kb.mozillazine.org/Locking_preferences

  • How can I disable pdf.js for all users?

    We as a company deal with a lot of PDF files.. Now while we can simply download the PDFs and there not be a problem, we're used to the Adobe Viewer and *not* downloading them.
    I've been told the new pdf.js viewer will not display most of the PDFs we throw at it on a day to day basis.
    Although there is a way to disable pdf.js (about:config), this only seems to change for the local user. We have FF 19 installed on terminal servers, and would like to know if there is a way to disable it for all users?

    hello, can you try it with the method described at [http://kb.mozillazine.org/Locking_preferences]?

  • Printer cannot print after disabling SNMP

    I need to disable SNMP for network security reasons.  After doing so from the web configuration page of my P2035N printer, network users cannot print to this printer.  It shows as 'offline', even on the web page.  We have tried restarting the printer, as well as the print spooler on the server.  It is connected via TCP/IP, IPv4.

    Working on the assumption that you had an older version of the Canon CAPT driver installed on this Mac before you installed 10.8, I suggest that you open Finder and trash the following files. Note that if you haven't done the reset that Greg has suggested, you will need to open Print & Scan and remove the current LBP6000 printer.
    Mac HD > Library > Printers > Canon > CUPSCAPT (trash this entire folder)
    Mac HD > Library > LaunchAgents > jp.co.canon.CUPSCAPT.BG.plist
    Mac HD > Library > Caches > Canon > CUPSCAPT > CCPD > ccpd.conf
    With the above files removed, restart your Mac and then run the CAPT v3.60 installer again. Then add the LBP6000 in Print & Scan and then see if you can print without error.

Maybe you are looking for

  • Error while invoking BPEL from ESB

    Hi All, I am try'n to invoke BPEL process from ESB services ,where my BPEL process contains a webservice which has an input parameter of type ,a customized bean. I am hitting with the below error <env:Envelope xmlns:env="http://schemas.xmlsoap.org/so

  • Installing Oracle 8i on Windows XP Home

    Hi All, Has anyone been able to install 8i (8.1.7) on Windows XP Home yet ? I have gotten as far as 98% complete and then the install just hangs. I have a P4 laptop and knowing about the P4 bug I've already renamed all copies of symcjit.dll and even

  • Problem Facing in Mass Changes

    Hi, I am facing problem in Mass Transfer -----> Changes. When trying to set a new depreciation rule. The process completes normally 1. When Preview Report shows it shows the asset preview of changes of depriciation rule. 2. then Run Process completes

  • CS4 - Dual Monitor Setup - Files open on wrong screen + Preview Adjustment layers

    I have various workstations running Mac OS 10.5.8 three run PS CS3, and one runs CS4 In CS4 files always open on the monitor I have allocated for my palattes.  Before CS4, Photoshop would open files on the monitor that my last filed was opened on.  T

  • Get Code 15 error over and over again

    I have been trying for hours now to install CS6 Suite on a new Mac Pro. Have even called in to Adobe Chat and spent an hour with them going through various attempts at solutions. Was left high and dry by chat person after they asked us to restart and