How to uncheck File and Printer Sharing for Microsoft Networks by Command!!

Dear everybody,
I meet a problem with my System now, and I need your help!!!
As mentioned in title, I need uncheck on File and Printer Sharing for Microsoft Networks by Command for Security purpose.
Could you show me the way to do it by command line
I think GPO can solve this but My Boss want to do it by command line
Thanks for your help!!!

netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
To disable these functions in Windows, use the same command and replace 'Yes' to 'No' in the above commands.

Similar Messages

  • X301 "File and Printer Sharing for Microsoft Networks" removed at re booting (XP SP-3)

    Even if I run the “Network Identification Wizard” (under System properties/Computer Name) to join a Workgroup, the box ‘File and Printer Sharing for Microsoft Networks’ remains unchecked.  If I ticked it manually, it remains checked for the current session, but it is unchecked at booting.
    The same occurs with the Windows Firewall (I am running that from Symantec). I switch the Windows Firewall off, but after rebooting, it appears selected again!.
    This happens only with my brand new ThinkPad X301, which came with Vista. The package included a kit to convert to XP, but this installed a ‘naked’ XP, which required downloading from Lenovo and Windows about 1Gb of files (bad service, Lenovo guys!).
    I wonder which “safety” issue of the X301 causes this, but how can I stop this happening? (It does not occur with any of my two old ThinkPads, also running XP SP-3 and Lenovo software).
    Solved!
    Go to Solution.

    See -> http://www.vistax64.com/vista-networking-sharing/72537-file-printer-sharing-turned-off-reboot.html  Here is the text. Re: File and Printer sharing turned off on reboot
    I FOUND MY SOLUTION!!!
    In my case, it was in Lenovo's "ThinkVantage Access Connections" applet. It
    is additional security that is applied at the CONNECTION level.
    Here is how I fixed it:
    1. Double click on the ThinkVantage Access Connections applet in the
    notification area.
    2. Click on the MANAGE button on the toolbar
    3. Select the SSID where you want File Sharing to work, and click EDIT
    4. Click on the ADDITIONAL SETTINGS tab
    5. Next to "Network Security", click the SETTINGS button
    6. The first option in Security Settings is "Disable file and printer
    sharing". UNCHECK this box. Click OK for 3 levels of dialog boxes, then
    close Access Connections
    Although these directions are specific to ThinkPad notebooks, the same
    principle may apply for other manufacturers' connection managers.
    Best of luck!

  • 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
    ¯\_(ツ)_/¯

  • File and printer sharing for Microsoft Networks on Windows server 2008

    Hi Expert,
    I found that the properties of File and printer sharing for Microsoft Networks service disabled after I install the windows server 2008 64bits. I tried to install that service via adding the file and printer sharing services in the properties of local area connection, but it doesn't contain any service in the popup box.  Also, no such service file available in the disk when I tried to install the service from installation disk of windows server 2008 64bits. Is the file "sacsrv.dll" corresponding to the service name of file and printer sharing? I found it is in the directory of "Windows\system32".  I have no idea about where is the problem? Do I miss some components? Please tell me what can I do for it? Thanks!
    Best Wishes,

    Do any experts know the reason of this problem?  Thanks!

  • File and Printer Sharing for Microsoft Networks is missing

    I have a Server 2012 Hyper-V VM that is missing the File and Printer Sharing for Microsoft Networks. When I try to Install the service it is not listed. The only service listed is Windows Network Virtualization Filter driver. I have the install media but
    I don't know where the driver would be located. I'm hoping someone can tell me where it is located.
    Update:
    I am trying to run Enable-NetAdapterBinding -Name Ethernet -ComponentID ms_server but it's not working and it's giving me this error.
    Enable-NetAdapterBinding : No matching MSFT_NetAdapterBindingSettingData objects found by CIM query for instances of
    the ROOT/StandardCimv2/MSFT_NetAdapterBindingSettingData class on the  CIM server: SELECT * FROM
    MSFT_NetAdapterBindingSettingData  WHERE ((Name LIKE 'Ethernet')) AND ((ComponentID LIKE 'ms[_]server')). Verify query
    parameters and retry.
    At line:1 char:1
    + Enable-NetAdapterBinding -Name Ethernet -ComponentID ms_server
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (MSFT_NetAdapterBindingSettingData:String) [Enable-NetAdapterBinding], C
       imJobException
        + FullyQualifiedErrorId : CmdletizationQuery_NotFound,Enable-NetAdapterBinding
    Vincent Sprague

    Ok, fixed it, I found the netserv.inf file in c:\windows\inf and tried to use it to reinstall File and Printer Sharing. However File and Printer Sharing was not listed. I copied the netserv.inf file from another Server 2012 VM and was able to install File
    and Printer Sharing using the copied NetServ.inf. After rebooting the server I was able to access network shares on the server.
    Vincent Sprague

  • Event id related to the removal of the file and print sharing for networks

    Hi ,
    Recently print team has migrated the print server from the physical old server A to the VM server A-new .After the migration ,  the server A-new is retained with the name server A shutting down the old server .
    But the clients are reporting that they are not be able to print because we found that due to this print team migrated the old print server to the new print server with the duplicated entries which reflected in AD. This our server team came to know once
    the complaint raised  by the site person to us saying that their printers are not working at all.
    While checking the issue only then we found that the duplicated entries are found in the AD for the printer objects published in the AD.Print team has done the improper migration and left to server team saying that it is our responsibility to solve the issues.
    And I suspect that somebody has  removed the file and print for networks in the network portion of the windows.We came to know only when we try to take any share either file share or print from the particular server to file server.
    After enabling that option in the network portion , everything got resolved as the duplicate entries removed from the AD and published one instance of the printers.
    I need to find the event in which this action has been triggered to remove that component and from that to identify who has done that..
    Any help is greatly appreciated
    Thanks & Regards S.Swaminathan Live & let others live!!!

    There are some print events on the Domain Controller if one of the DC "pruned" the old print objects.  Unfortunately these are information events logged to Print-Service Operational channel which is not enabled by default.  You might
    be lucky and someone had these events enabled. 
    Check if the channel is enabled on all your domain controllers. 
    http://social.technet.microsoft.com/wiki/contents/articles/13308.troubleshooting-windows-server-2012-printing.aspx
    Alan Morris formerly with Windows Printing Team

  • Script to install and enable file and printer sharing windows 7

    Hello
    I posted this question on the Microsoft Partner Windows 7 forum and the support person told me that I should post it here.
    I have a Customer that was running Novell.  We will migrate them to Active Directory.
    The question I have is.  they did remove the file and printer sharing service on their Windows 7 workstations.
    Is is possible to have a command line or a script to install and enable the file and printer sharing for Microsoft Network?
    We need this enable in order to install the SCCM client remotely
    Greetings
    Gaetan Labrecque

    How are you going to connect to the workstations?
    File and print sharing are not needed for Group Policy to work.  GP can be used to re-enable file and Print Sharing.
    You will also  need to start by joining the machines to the domain.  That will be very difficult unless all have PowerShell and are configured for WinRM.
    This can be somewhat accomplished by using VBScript remotely but will require a very sophisticated admin to set up and debug in your environment.  I recommend hiring a consultant who has experience in conversions or is a master VBScripter in a domain.
    There is no easy answer.  It is not about File Sharing.
    Here is how to add roles and features with PowerShell:
    http://technet.microsoft.com/en-us/library/hh831809.aspx
    ¯\_(ツ)_/¯

  • File and Printer sharing on Windows 7 Through Group Policy

    Hi,
    I was wondering how to enable File and Printer sharing on Windows 7 Through Group Policy. I have enabled the policy called: Allow inbound file and printer sharing exception.
    But when I go to advanced sharing settings, it's still turned off.
    Windows Server 2003 AD Domain, and I'm using the Group Policy Manager from my Windows 7 machine to edit the policy.
    Any ideas?

    Hi,
    Based on my knowledge, there is no Group Policy setting for enabling and disabling File and Printer sharing. To do this, you may need to write a script and you can go to our Scripting Forum for help.
    In addition, I would like to share the following with you:
    Enable or Disable File Sharing for a User or Group by Using Group Policy
    Network and Sharing Center Group Policy Settings
    Hope this helps. Thanks.
    Nicholas Li - MSFT

  • T61 XP-pro Microsoft file and printer sharing unchecks on Intel(R) 82566M NIC after reboot

    I check Microsoft file and printer sharing but after reboot it is unchecked for Intel(R) 82566M NIC connection profile.
    Anyone else seen this or fixed?
    Message Edited by jbaaremartin on 07-18-2008 11:11 PM
    Solved!
    Go to Solution.

    Problem was setting in security section for the profile in Thinkvantage Access Connections; it was set to cancel Microsoft File and Printer sharing.

  • Fix for WRT54G file and printer sharing

    I have two computers, both connected via wireless. They were connected with a 2 year old Linksys router, that was working great, but got destroyed in a move.
    I purchased a new linksys WRT54G router.
    Symptoms were that both had great access to the internet, but I could not file and print share between them.
    After 5 phone calls into tech support, I finally escallated to a senior tech support guy, who had me turn off the firewall.
    I have McAfee firewall. I diabled the firewall for testing, and it all worked instantly.
    So, I went to McAfee personal Firewall, Options on bottom left, and set a trusted range of ip addresses from 192.168.1.0 through 192.168.1.255, then turned the firewall back on. On my computer, I already had the policy of "trust devices on the local network", but for some reason that wasn't good enough.
    For some reason, the McAfee does not like the new router. I know there are a BUNCH of posts on this forum, and other forums, and I would hate for Linksys to become known as not being a great product.
    The first level tech support at Linksys told me "we do not support file and print sharing." I had to keep escallating to finally reach someone that understood the router SHOULD pass packets back and forth.
    I never thought of the firewall.
    Also, you have to adjust the firewall on every computer that you want to share devices or files off of.

    Do any experts know the reason of this problem?  Thanks!

  • How to check if file and printer sharing is on or off

    Hi,
    i want to evaluate if the windows file and printer-sharing is turned on or not with a script.   
    With regshot i found out that the DLL hgclp.dll is involved but not which registry-entry is the one set.

    i know it should be but on some machine it is not the case even if the domain-bind etc is fine.
    Manual workaround is to look at each one by hand and set it to enabled. Gpupdate does not change something in these cases.
    If i had a way to validate this setting via script it'd be faster.

  • E3000 file and printer sharing issues

    Yes, there is at least one other thread on this but it looked a bit stale.
    Last Friday I replaced my BEFSR41 router and WRT54G wireless access point (which had gone brick on me) with an E3000.The E3000 is configured as a DHCP server at 192.168.168.65 with a scope of 66-115. The only other non-default setting is that I opened up the custom port for my slingbox.
    Prior to making the switch, I had several network shares on an XP desktop that I used frequently from my Vista laptop. Now, however, I can no longer even "see" any other computer from any of the computers on the network, much less access their shared folders. In other words, if I view the network from any of these machines, the only machine that shows up is the machine itself. Everything else (internet access, slingbox, a print server) is working just fine.
    One of the suggestions in the other thread was to turn off Norton Internet Security, which is of course not a viable option. However I did check the settings, relaxed the network default to "Shared", and raised the XP desktop to "Full Trust". This had no effect.
    I pinged the various computers, and was able to do so by their IP addresses, but not by their computer names (that worked with the old router). On a hunch, I tried creating a mapped drive, and that also worked when I used the IP address, but not when I used the computer name.
    So - there's nothing wrong with the network configuration, or with how the shares are set up, and Norton isn't the problem. The only problem seems to be that names aren't being resolved, which could be affecting windows discovery, too. Did the BEFSR41 provide some local DNS functionality by default, and the E3000 doesn't? Is there an option I need to enable? If so, I can't find it. Perhaps I should explicitly add the E3000's internal IP address as a third nameserver??
    A note on the "support" I tried to get before I turned to the forums: The "Chat agent" asked a bunch of questions, misunderstood my configuration and my problem, and once he finally did understand said "we don't support file and printer sharing". It took me several more questions to learn that he really meant that the Chat facility isn't the place for these questions - I had to call the 800 number. I did that, and after several minutes on hold, reached an agent. After going through everything again, and with the rep going on hold several times to "speak to his supervisor", he said it was "beyond his competence". I was eventually told I had to call another FEE-BASED service. I told him that was unacceptable.

    Ok, another update and possibly some clues.
    I was curious why at one point, when all the computers were in Workgroup2, that "Workgroup" still showed up in Explorer under the list of networks, but only on the two XP machines. Netscan showed this group association as well, which I then realized was the E3000 itself, in its role as a [I]potential[/I] NAS server. However there was no storage device attached.
    Could this in itself cause the access error? If so, should users be advised that if they don't plan to host any storage, that they should to go to the E3000 Storage Administration page and change the workgroup name to something other than their actual workgroup name?
    In my case, I changed it to "Workgroupx", though perphaps something like "StorageGroup" would be more meaningful, especially if the Workgroup computers could still access any storage I might install in the future.
    Anyway, I repeated my original approach (after the above change and a router reboot), and at least got my original Workgroup reestablished to the point where the XP machines not longer get access errors, and most machines can access the shares on the XP desktop. The steps I used on each machine were:
    remove any shares I had set up on any folders
    uninstalled the File and Printer Sharing service
    Accessed Computer Name properties page to change the workgroup name
    Shut Down
    After all 4 were done, I reversed the process:
    Started computer (now coming up in new Workgroup)
    Reinstalled File and Printer Sharing service
    Checked visibility
    At this point, the XP machines could see each other, and the Win7 and Vista machines could see each other, but initially these two cliques wouldn't interact.
    Next I re-added the shared folders on the XP desktop, and the XP netbook could see and access them. After about an hour, the Win7 machine joined this clique, and could also access the shares. But six hours later, the Vista machine is still clueless. Netscan shows everything of course, and I used it to set up a mapped drive on the Vista machine to one of the shared folders.
    Other possibly relevant facts:
    The was all working fine with the BEFRS41/WAP54G combo
    I can ping all machines by IP address, but not by name
    On the Vista machine I can set up mapped drives to the XP's shared folders, but again, only by IP address.
    At one point I removed NWLink from the XP desktop. Now, nbtstat -r only shows the printserver's name being resolved.
    The two XP machines, being SP3, lack the LLTD responder.
    So,
    Is it possible the NetBIOS in NWLink was providing some kind of name caching? If so, should I reinstall the protocol driver (I don't think it is available on Win7)?
    Should I request and apply the KB922120 hotfix to get LLTD onto the XP machines?
    Perhaps in the morning, "by name" access will have returned, as it did on my first go-round. Needless to say this has been a real pain, what with all the reboots required. At least now I remember to hit F8 so I can select Safe Mode with Networking...

  • Lenovo Thinkvanta​ge Access Connection​s prevents Microsoft File and Printer Sharing

    We have several Think pad laptops deployed in our company, including G41, T61, and T500 models.  We are using Numara's Track It software to inventory our workstations and laptops.  The auditing process needs to have Microsoft File and Printer Sharing turned on in order to work.  We have enabled a group policy to set this to on by default.  However, the Thinkavntage Access connections manager for the LAN connection overrides the GP and turns off the File and Printer Sharing by default.  What's worse, with it off, we can't remotely manage the machine's services or even access the registry.  We know that his is the issue, because reconfiguring the access connections manager to allow the file and printer sharing will allow all of our remote administration tools to work, insluding the inventory audit.
    Does anyone know how to disable the access connection manager from running remotely?  or does anyone know how to change the settings remotely to all for the microsoft file and printer sharing to be enabled by default.  I would hate to have to visit each user individually just to turn off a setting. 
    anyone else run into headaches because of this "security feature"? 
    Jason

    1.Find snetcfg.exe on internet
    2.Create batch who runs snetcfg with this commnads from network locations
    (this setting enable  File and Printer Sharing)
    snetcfg -u MS_Server
    snetcfg -c s -i MS_Server
    3. Deploy and run batch on laptops (GPO)
    4. Deploy new AC profiles settings  (.loa)
    done
    sorry for my english

  • BEFW11S4 with Westell/Bellsouth DSL, and wanting file and print sharing

    I have configured the BEFW11S4 to share the DSL connection with Ethernet to home PC, and wireless to laptop.
    How can I configure this to also allow the laptop to connect to the home PC for file and printer sharing?
    Sorry if the is discussed elsewhere, im noob here and couldnt find anything applicable.
    Thanks!
    J

    Check IP on each PC: For example:
    PC1: 192.168.1.100
    PC2: 192.168.1.101
    Ping 192.168.1.101 from PC 1 and ping 192.168.1.100 from PC2... see which replies...
    If both give out positive replies... then that is not a router issue but PC issues. Might be firewalls.
    Message Edited by sharkbyte on 02-20-200701:32 PM

  • File and Print Sharing over wireless

    I have the following hardware:
    MBP - Brand spanking new kickin' machine running 10.4.x
    G4-400 - old but still doing nicely running 10.3.9
    PC running XP
    MBP has the extreme card built in
    G4-400 has a third party wireless card that's been working for 2 years
    PC has a netgear wireless card
    Router is a netgear WR814v2 wireless B
    Facts: Before I bought the MBP last week, I could access files between my G4 and PC fine over my network and access the web at the same time. When I connected the MBP to the network, I could surf. When i tried to turn on filesharing, it works for a short time, but then knocks the network offline. The model still shows a connection and my router still broadcasts and the wireless cards all get the signal, but nothing connects.
    To troubleshoot the issues, this is what I've done so far:
    When it went down, the first thing I did was turn file and print sharing off on both of the macs, restarted and tried the connection. Again, model still shows logged in, but no connection. Then i plugged the PC into the ethernet port on the router to get a wired line. Still no connection on the PC. Next, I shut down the macs, disabled the wireless on the PC and restarted the PC. Still no connection through the ethernet port even though the model and router still show all signs good. Also, through all this, I couldn't log into the router's IP address once I was wired to it. Next I shut down the router and modem, waited, then turned on the modem, waited for it to cycle to ready, then turned on the router. The modem showed that it was connected, then the router showed wireless broadcasting. Then I had my connection to the web back.
    I then went back to square one and tried file sharing again and again everything locked up. It seems like some how the file sharing between the macs is confusing the router. I tried fixing the ip address that the router assigns to each machine, but that didn't solve the problem. I'm at my knowledge's end. What am I doing wrong here? My goal is to share files at least between the macs and print through the G4 which has a USB and a Firewire printer attached. I'd like to accomplish the filesharing while still being able to access the web. But for some reason, I can the file sharing up and running for a short time, but then everything falls apart and locks up.
    MBP   Mac OS X (10.4.6)   G4-400 and PC also on network

    I figured out the networking mess - the secret, don't follow the instructions on the apple site - listen only to everyone in this discussion. I kept following the instructions to turn on appletalk and that's what was tying everything up. When I just use the sharing preference panel without going into the network preference panel, all is good in the world. I can now view all three computers with their shared folders(enhanced by sharepoint for a couple of external drives) and also print from all machines to the printers hooked up to the G4.
    PowerPC G4 400   Mac OS X (10.4.2)  

Maybe you are looking for