Scripts Thread, Sharing folder on remote server in Coding and Web Development; I've got an AutoIT script that creates new users and on our old server 2003 server it would also use ...
12th September 2011, 01:04 PM #1
Sharing folder on remote server
I've got an AutoIT script that creates new users and on our old server 2003 server it would also use WMI to share their home folder.
Since we upgraded to 2008 r2 I've tried running the script again and it does everything apart from sharing the folder on the server.
it uses the win32_process command which i've read should still work on 64 bit servers.
this is the command, which worked on server 2003 but no longer works, can anyone see why it doesn't?
$objWMIService = objGet("winmgmts:\\" & $datacomp & "\root\cimv2:Win32_Process")
$objWMIService = $Locator.ConnectServer($datacomp, "\root\CIMV2")
$objNewShare = $objWMIService.Get("Win32_Share")
$objNewShare.Create('"' & "F:\Home Directories\Junior Pupils\" & $username & '"', $username & "$", $FILE_SHARE, $MAXIMUM_CONNECTIONS, "Share for " & $username)
IDG Tech News
12th September 2011, 03:39 PM #2
got it sorted, not quite sure how but it started working, so ignore this
By BKGarry in forum How do you do....it?
Last Post: 29th July 2009, 09:32 AM
By fred54 in forum Windows
Last Post: 12th December 2007, 09:52 AM
By tosca925 in forum Windows
Last Post: 20th October 2005, 07:48 PM
Last Post: 12th September 2005, 05:52 PM
By ninjabeaver in forum Windows
Last Post: 6th September 2005, 01:26 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)