If you are trying to run an ADSI/WMI Script remotely from a client machine which gets information the from IIS web server around websites etc. you may see this:

“Invalid syntax” or error code 800401E4

Or

Microsoft VBScript runtime error: The remote server machine does not exist or is unavailable: 'GetObject'

In my script I was using the following

GetObject( "IIS://" & ServerName & "/W3SVC" )

So basically the above error was complaining about the use of GetObject.

Resolution

1. Ensure Firewall is not blocking access to your server from remote access on the client.

2. ADSI provider should be installed on the client as well as the IIS machine for the above script to work. For running ADSI script against IIS we need to ensure the ADSI provider is installed as below.