Jump to content

Recommended Posts

Posted

I'm wanting to silently call a PHP script on an internal webserver from each PC as it logs on, and then a different script at logoff. I'm wondering if there's a way to call these using GPO's?

 

Can anyone advise?

Posted

Well you can configure a PowerShell logon script and call the website in that:

 

Invoke-WebRequest -Uri https://www.google.com -UseBasicParsing

 

Or use a command line tool in a similar way.

Posted
If the computers have php installed and the install location in the system PATH variable, you can simply run 'php c:\path\to\script.php' in a batch file or whatever. Should be pretty simple to do.
Posted

Another way to fetch a webpage, using vbs (in case you already use vbs login/logoff scripts)

http.open "GET", "http://", FALSE
http.send ""

Posted
Uses NTLM authentication to identify the pc name and username and then logs those to a MySQL database to give us a quick overview of PC usage and who's logged in where. Staff can then access a page on our intranet showing a list of free PCs
Posted
You will probably want to also run your script for user logout on computer startup, in case someone hits reset rather than logging out. Maybe even a scheduled ping to catch any that have just been turned off as well.
Posted
Would it be easier to do it through Powershell for the login/logout script? It could input the required information and the teaching staff are still able to access this info through a PHP page? Might be more work to write the Powershell script though.
Posted
I've 3 scripts in total - login, logout, and "startup" which adds the PC to the database if it doesn't exist, and clears any remaining logins at startup

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...