Kaseya Community

Script that will map a drive to Novell server

  • Has anyone created a script that will map a drive to a Novell server from a workstation? I am getting inconsistent results when using the following command.

    NET USE Z: "\\ServerName\volume" /persistent:no /u:.UserName.OrganizationalUnit.Organization PASSWORD

    I have verified the username, password and made sure the user has rights to the volume. I need this script to execute overnight when there would be no user logged onto the workstation. Sometimes the drive maps other times it does not. I have tried executing the shell command as both user and system.

    Any ideas?

    Legacy Forum Name: Script that will map a drive to Novell server,
    Legacy Posted By Username: akoop
  • The account which is running this script will need to be running under a domain account. i.e. The account which is used to run the Kaseya service will need to be something other than localsystem.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: PeterS
  • Why would this need to be a domain account? I am not trying to map to a Windows server, but rather a Netware box.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: akoop
  • Sorry, force of habit. It needs to run under an account which has access to the network and has permissions to the remote resource.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: PeterS
  • I would like to be able to use the Impersonate User command inside the script to run as a local user with access to the network. The NET USE command will provide different user credentials for a user account with access to the Novell server. Should this configuration work?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: akoop
  • Here is a copy of my script, anyone have any ideas as to why the drive will not map in the Execute Shell Command step? NWUSER is a user account on the Netware server only, does not exists on the local Windows machine. NWPASSWORD is the Netware password for that account.

    Script Name: AVG Netware Scan
    Script Description: This script will map the drive letter defined by the DRIVE variable to the share defined by the SHARE variable on the Novell Netware server defined in the NWServer Managed System Variable and then perform an AVG scan on that drive. It uses the NWContext variable to help build the username.

    IF User Is Logged In
    Parameter 1 :
    THEN
    Write Script Log Entry
    Parameter 1 : NOTE: AVG NETWARE SERVER SCAN DID NOT RUN, A USER WAS LOGGED ON.
    OS Type : 0
    ELSE
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : MACH
    OS Type : 0
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : AgtTmp
    OS Type : 0
    Get Variable
    Parameter 1 : 2
    Parameter 2 : Z:
    Parameter 3 : DRIVE
    OS Type : 0
    Get Variable
    Parameter 1 : 2
    Parameter 2 : apps
    Parameter 3 : SHARENAME
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : NOTE: Scan Performed: C:\Program Files\AVG\AVG8\avgscanx.exe /SCAN=#Drive# /Report=#AgtTmp#\AVGScanResults.txt /Trash /Arc
    OS Type : 0
    Execute Shell Command - (Continue on Fail)
    Parameter 1 : Net Use #Drive# /del
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : NET USE #Drive# "\\\#SHARENAME#" /user:.NWUSER. NWPASSWORD
    Parameter 2 : 1
    OS Type : 0
    Execute File
    Parameter 1 : C:\Program Files\AVG\AVG8\avgscanx.exe
    Parameter 2 : /SCAN=#Drive# /Report=#AgtTmp#\AVGScanResults.txt /Trash /Arc
    Parameter 3 : 2
    OS Type : 0

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: akoop