Re: Disable/enable file and print sharing with group policy
- From: "pepe" <pepe@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 May 2005 13:54:43 -0700
Wow. All those group policy objects and not one on file and print sharing?
Bummer. Thanks for the suggestion. When I get back from vacation I'll look at
it closer.
Later,
pepe
"Torgeir Bakken (MVP)" wrote:
> pepe wrote:
>
> > Can someone please help me find the object in group policy that i can use to
> > disable/enable file and print sharing. When we installed all of our
> > workstations, we did so with file and print sharing disabled. Now, we would
> > like to push an antivirus client install and it needs file and print sharing
> > enabled. After the install, we will disable it again.
> Hi,
>
> There is nothing in group policy that can help you here.
>
> You might get something to work with snetcfg.exe.
>
> If you want to use Snetcfg.exe to _enable_ File & Print Sharing (F&PS
> already installed, but the checkbox is not checked), you will have to
> uninstall F&PS first, and then install again (using snetcfg.exe for
> both tasks). This will make the checkbox checked.
>
> Also note that uninstalling F&PS will remove the server service.
>
> I suggest you use a computer startup script (with a GPO) that runs as
> part of the boot up process (before the user logs in). It runs under
> the system context and has admin rights.
>
> To be able to access files over the network from the computer startup
> script, you could put the file(s) on a network share and grant read
> access for the AD group "Domain Computers" to the share.
>
> Alternatively, from the startup script, you could map a drive on
> the fly, like this:
>
> sDomainUser = "arp.corp\computer_fix"
> sPswd = "something"
>
> Set oNetwork = CreateObject("Wscript.Network")
>
> oNetwork.MapNetworkDrive _
> "Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd
>
>
> More about snetcfg.exe and F&PS here:
> http://groups.google.co.uk/group/microsoft.public.scripting.vbscript/msg/bc2ef5a6df39fdad?dmode=source
>
>
> Also, it looks like you can combine parsing the output from
> nbtstat.exe -n and checking the server service existence to obtain
> current status:
> http://groups.google.co.uk/group/microsoft.public.scripting.wsh/msg/7709954edf163021?hl=en
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx
>
.
- References:
- Disable/enable file and print sharing with group policy
- From: pepe
- Re: Disable/enable file and print sharing with group policy
- From: Torgeir Bakken \(MVP\)
- Disable/enable file and print sharing with group policy
- Prev by Date: active directory missing
- Next by Date: Getting up to Speed on ADAM
- Previous by thread: Re: Disable/enable file and print sharing with group policy
- Next by thread: deleted user account still has a mailbox
- Index(es):
Relevant Pages
|