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)
got it sorted, not quite sure how but it started working, so ignore this
There are currently 1 users browsing this thread. (0 members and 1 guests)