[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Delete Sharing created by the user in your computer

Hi,

I need remove/delete sharing created by the user in your computer, it´s possible remove this sharing through of script or GPO of domain?

Regards,

Marcelo
0
fmarcelo14
Asked:
fmarcelo14
  • 3
  • 2
1 Solution
 
SommerblinkCommented:
If I understand you correctly, you are asking if there is a way to remove network shares from a client computer via script or GPO.

Via script, you could execute the following command:

net share * /delete

This would cancel out any persistent shares
0
 
fmarcelo14Author Commented:
I need remove local sharing folders created by user in your computer. Only sharing folders created by the user.
I attachment example: Sharing folders in local machine.

Regards,

Marcelo
Sharing-folders-in-local-machine.doc
0
 
speshalystCommented:
You need to write a script that will remove the Key "Shares" from
HKEY_LOCAL_Machine\System\CurrentControlSet\Services\lanmanServer

You can use these links to know how to uses the Reg.exe command
http://commandwindows.com/reg.htm
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
fmarcelo14Author Commented:
Thanks for help, but I have question.
Your suggestion resolved to machine with SO Windows XP, but the machines with SO Windows 7 have UAC enable and I can´t disable the UAC, can I resolved this problem?
My Active Directory is Windows Server 2003.

Regards,

Marcelo
0
 
SommerblinkCommented:
When you do things via GPO or logon script, they already run with elevated privilages.

If you do this via command-line, the 'net use' commands do not require elevated privilages. The reg command most likely will.
0
 
fmarcelo14Author Commented:
I received error, attachment error.
How can I elevated privillages in Windows 7 by bat ou vbs?

Thanks

Marcelo
Script-error.doc
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now