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