Re: Prevent Sharing drives on clients

Tech-Archive recommends: Fix windows errors by optimizing your registry



Jordan,

You could use this script to temporarily remove the C$ share from the
machine, this would then be gone until the next reboot of the machine. This
would be re-enabled because of the autoshares reg key that generates Admin
Shares, which you cannot remove because you want to maintain the Admin$
share.

Script:
-------------------
strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colShares = objWMIService.ExecQuery _
("Select * from Win32_Share Where Name = 'C$'")

For Each objShare in colShares
objShare.Delete
Next
--------------------

The problem is that what ever you configure through Group Policy a user
with Local Administrator rights can remove if they have the knowledge and
will to do so.

--
Dave Britt

Dave's Weblog
http://davebritt.blogspot.com


"Jordan" <none@xxxxxxxx> wrote in message
news:%239tbsmglGHA.1972@xxxxxxxxxxxxxxxxxxxxxxx
I have a couple of users that need to be administrators on their local
computer (developing hardware and software). They keep sharing their hard
drive so they can access it from other computers which is a big no-no here.
Is there a GP that prevents creating new file shares but leaves the Admin$
share for remote management programs?



.



Relevant Pages

  • Re: User log out?
    ... All I'm saying is that if bad credentials have somehow ... When you reboot or kill all client sessions it will force the user client to ... login to Sharepoint as themselves. ... Last solution which might end up backfiring is change the admin ...
    (microsoft.public.sharepoint.windowsservices)
  • RE: Failed boot after automatic update
    ... do not have much faith now in autoupdates however!! ... "SAG Admin" wrote: ... Attempting to fix the MBR had no effect. ... > reboot the BIOS would not recognize that a hard drive was even installed. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Constant Crash
    ... Reboot came up blue screen with general ... When I hard boot from this dead desktop I ... I booted to safe mode and logged in as ADMIN. ...
    (microsoft.public.windows.mediacenter)
  • Constant Crash
    ... Reboot came up blue screen with general ... When I hard boot from this dead desktop I ... I booted to safe mode and logged in as ADMIN. ...
    (microsoft.public.windows.mediacenter)
  • Re: ntuser.dat in use
    ... I usually just do a copy paste of the local profile to another pc on ... I guess reboot it is. ... While logged on with my admin id, I will back up all the profiles (except ... It depends on the backup program you use. ...
    (microsoft.public.windowsxp.general)