Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

SMB Azure File Sync connect apple script

Has anybody been successful with creating an apple script to connect to an smb://ipaddress/sharename

i have tried but not successful

Of course the password is very long and difficult with # and / and * and + and &, but it seems i always get an error

number -10006 from password

Has anybody successfully created an smb script to connect to AD File Share?


-- Set the server address and credentials

set serverAddress to "ip address/general"

set username to "filestoragename"

set password to "longhashpassword"


-- Mount the server in Finder

tell application "Finder"

try

-- Check if the server is already mounted

if not (disk serverAddress exists) then

-- Mount the server using the credentials

mount volume "smb://" & username & ":" & password & "@" & serverAddress

end if

on error errStr number errorNumber

display dialog "Error: " & errStr & " (" & errorNumber & ")" buttons {"OK"} default button 1 with icon stop

end try

end tell

Posted on Jun 27, 2023 6:49 AM

Reply

Similar questions

There are no replies.

SMB Azure File Sync connect apple script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.