none
Powershell script RRS feed

  • Question

  • hi

    Can anyone please help me to make correction in below script. I think there is some issue in adding paths

    I have used below script for manageengine installation on client machines but it gives me syntax error. below is the script. can anyone help me to correct the below script.

    On Error Resume Next
    Set WSHShell = WScript.CreateObject("WScript.Shell")

    argCount = WScript.Arguments.Count

    if (argCount>5) then
    ' Get Location and arguments of the script
    msiFile = WSCript.Arguments.Item(0)
    PROTOCOL = WSCript.Arguments.Item(1)
    SERVERIP = WSCript.Arguments.Item(2)
    SERVERNAME = WSCript.Arguments.Item(3)
    PORT = WSCript.Arguments.Item(4)
    AGENTPORT = WSCript.Arguments.Item(5)
    wshshell.Run "msiexec.exe /i ""\\fileserver-new\MSIPackages\ManageEngineAssetExplorerAgent.msi"" ENABLESILENT=yes REBOOT=ReallySuppress PROTOCOL=http SERVERIP=10.92.x.x SERVERNAME=servicedesk PORT=8080 AGENTPORT=9000 /qn",0,True
    end if


    Monday, September 2, 2019 7:53 AM