Petri IT Knowledgebase Forums
 

Petri.co.il forums Home Forums Start Page Forums Frequently Asked Questions FAQ Member List Members List
Go Back   Petri IT Knowledgebase Forums > Windows Scripting > Powershell
Petri.co.il is happy to award auglan the title of Most Valuable Member !!!
Register Calendar Calendar Search Petri IT Knowledgebase Forums Search Todays Posts Today's Posts Mark Forums Read

Notices

Activating an directory sharing

Activating an directory sharing

this thread has 3 replies and has been viewed 4362 times

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st June 2012, 19:22
balubeto balubeto is offline
Junior Member
It's not a coincidence
 
 Join Date: Jul 2011
  6 month star 12 month star
 Posts: 141
 Reputation: balubeto is a Serial Question Asker (-55)
Default 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
  #2  
Old 1st June 2012, 22:18
Ossian Ossian is offline
Administrator
 
 Join Date: Nov 2003
  6 month star 12 month star
 Location: Bonnie Scotland
 Posts: 15,120
  Send a message via Skype™ to Ossian
 Reputation: Ossian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud of (1300)
Default 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 **
  #3  
Old 2nd June 2012, 11:01
balubeto balubeto is offline
Junior Member
It's not a coincidence
 
 Join Date: Jul 2011
  6 month star 12 month star
 Posts: 141
 Reputation: balubeto is a Serial Question Asker (-55)
Default Re: Activating an directory sharing

\
Quote:
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 at 19:40..
  #4  
Old 2nd June 2012, 19:58
Ossian Ossian is offline
Administrator
 
 Join Date: Nov 2003
  6 month star 12 month star
 Location: Bonnie Scotland
 Posts: 15,120
  Send a message via Skype™ to Ossian
 Reputation: Ossian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud ofOssian has much to be proud of (1300)
Default 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 **
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Activating OCS 2007 R2 Standard nukunu OCS / Lync Server 0 7th February 2011 12:33
Activating text-to-speech on non-English Win7 Ultimate chermesh Windows 7 0 10th October 2010 21:03
Activating Office 2010 with KMS (split from Server 2008 forum) masorrell Office 2010 General Issues 3 4th June 2010 12:52
SBS 2003 Std. freezing after activating OS and 5 CAL's asiddhu SBS 2000 / 2003 1 27th April 2005 03:36
Activating XP BPM Windows 2000 Pro, XP Pro 6 25th January 2004 08:29


All times are GMT +3. The time now is 05:12.

Steel Blue 3.5.4 vBulletin Style ©2006 vBEnhanced
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
 

Valid XHTML 1.0!   Valid CSS!

Copyright 2005 Daniel Petri