I don't understand your previous reply message. I 'll try to be more specific.
I need a query that I can run in SMS that will look into a specified pc's c: drive to find all folders with in a path (PATH is c:\Docs and Settings\)that will hold all of the users who have logged into the specified machine in the past.
I can write a query that will find the lastlogonuser, but I need ALL of the lastlogonusers for the history of the machine.
Here is an example of what I am doing.
select SMS_R_System.NetbiosName, SMS_G_System_PC_BIOS.SerialNumber, SMS_GH_System_COMPUTER_SYSTEM.TimeStamp, SMS_R_System.LastLogonUserName from SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId inner join SMS_GH_System_COMPUTER_SYSTEM on SMS_GH_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.NetbiosName = "USLVWS806503" and SMS_R_System.LastLogonUserName = "JLamkin" order by SMS_R_System.NetbiosName, SMS_G_System_PC_BIOS.SerialNumber, SMS_GH_System_COMPUTER_SYSTEM.TimeStamp, SMS_R_System.LastLogonUserName
Output shows:
Asset # Serial # Time UID 1
USLVWS806503 123456789 Time/Date JLamkin
I need it to show:
Asset # Serial # Time UID 1 UID 2 etc...
USLVWS806503 123456789 Time/Date JLamkin DJohnson
Any assistance is appreciated!
I need a query that I can run in SMS that will look into a specified pc's c: drive to find all folders with in a path (PATH is c:\Docs and Settings\)that will hold all of the users who have logged into the specified machine in the past.
I can write a query that will find the lastlogonuser, but I need ALL of the lastlogonusers for the history of the machine.
Here is an example of what I am doing.
select SMS_R_System.NetbiosName, SMS_G_System_PC_BIOS.SerialNumber, SMS_GH_System_COMPUTER_SYSTEM.TimeStamp, SMS_R_System.LastLogonUserName from SMS_R_System inner join SMS_G_System_PC_BIOS on SMS_G_System_PC_BIOS.ResourceID = SMS_R_System.ResourceId inner join SMS_GH_System_COMPUTER_SYSTEM on SMS_GH_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.NetbiosName = "USLVWS806503" and SMS_R_System.LastLogonUserName = "JLamkin" order by SMS_R_System.NetbiosName, SMS_G_System_PC_BIOS.SerialNumber, SMS_GH_System_COMPUTER_SYSTEM.TimeStamp, SMS_R_System.LastLogonUserName
Output shows:
Asset # Serial # Time UID 1
USLVWS806503 123456789 Time/Date JLamkin
I need it to show:
Asset # Serial # Time UID 1 UID 2 etc...
USLVWS806503 123456789 Time/Date JLamkin DJohnson
Any assistance is appreciated!