<HTML>
<HEAD>
<TITLE>Grep(?) or other method for a logged on user.</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello,<BR>
<BR>
I was looking for a command that I could use to verify that a user is logged onto their machine before a policy is run (as opposed to a machine being on, but sitting at the login screen)<BR>
<BR>
I want to make sure that they are logged in so they are sure to get the messaging that this policy has run.<BR>
<BR>
I am imagining something like the following:<BR>
<BR>
If any user is logged in (except for our 2 admin accounts whose name I can specify)<BR>
<BR>
Execute jamf policy –trigger “custom trigger”<BR>
<BR>
Else quit.<BR>
<BR>
Does anyone have an idea on the scripting for this?<BR>
<BR>
Thanks very much,<BR>
Matt Oclassen<BR>
<BR>
Desktop Systems Specialist<BR>
</SPAN></FONT><FONT COLOR="#7F7F7F"><FONT SIZE="5"><FONT FACE="Monotype Corsiva"><SPAN STYLE='font-size:18pt'>sales</SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Monotype Corsiva"><SPAN STYLE='font-size:18pt'><FONT COLOR="#FF0000">force</FONT><FONT COLOR="#00007F">.</FONT><FONT COLOR="#7F7F7F">com<BR>
</FONT></SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10.5pt'><BR>
<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>