A python script restarts ArcGIS server printing services on a daily basis.
-
The script itself gets triggered by a batch file which runs under Windows task scheduler.
-
In this case, the ArcGIS Server is federated by Portal which hosted in an internal network environment. As the internal network is guided with Windows IIS proxy server, the NTLM authentication handler is used to wrap users' proxy username and password which match the records in Windows AD (active directory).
-
Once the proxy server verifies users' credentials, then users' tokens to ArcGIS Server admin page will be generated by the internal Portal.
-
The final step is leveraged by ArcGIS Server's REST API for restarting services.