Announcement

Collapse
No announcement yet.

Activating an directory sharing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Activating an directory sharing

    HI

    Using the Powershel lfor Windows 7 SP1, how do I set the users/groups with their permission to share a directory and then how do I activate it?

    THANKS

    BYE
    balubeto

  • #2
    Re: Activating an directory sharing

    Anything useful on ?
    http://www.google.com/search?client=...&nfpr=&spell=1
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Activating an directory sharing

      \
      Originally posted by Ossian View Post
      I found this function:

      Code:
      Function NEW-SHARE ($Foldername, $Sharename) {
      
         # Test for existence of folder, if not there then create it
         #
         IF (!(TEST-PATH $Foldername)) {
              NEW-ITEM $Foldername -type Directory
          }
      
        # Create Share but check to make sure it isn’t already there
        #
         IF (!(GET-WMIOBJECT Win32_Share -filter “name=$Sharename”) {
              $Shares=[WMICLASS]”WIN32_Share” 
              $Shares.Create($Foldername,$Sharename,0)
         }
      }
      but I am unable to add the instructions for adding users/groups (with their permission) authorized to access this resource.

      So, could you help me again?

      THANKS

      BYE
      Last edited by balubeto; 2nd June 2012, 17:40.
      balubeto

      Comment


      • #4
        Re: Activating an directory sharing

        Amazingly, the same site, , produces some examples very quickly

        http://www.google.co.uk/#sclient=psy....,cf.osb&cad=b
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment

        Working...
        X