Jump to content




dj3094

SCCM query to find shortcut on public desktop



Recommended Posts

Hello all,

I am trying to get a report of workstations that have a shortcut on desktop. 

select SMS_R_System.NetbiosName, SMS_R_System.LastLogonUserName, SMS_G_System_SoftwareFile.FileName from  SMS_R_System inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName like "foo.lnk" and SMS_G_System_SoftwareFile.FilePath like "C:\\Users\\Public\\Desktop\\"

 

I could not make it work as this program is installed on the machine. its just a link to web portal

Share this post


Link to post
Share on other sites


Have you enabled software inventory 

Is software inventory Inventoring .lnk files?

Is there a reason you aren't just using a configuration baseline? it is easier to do this. 

 

  • Like 1

Share this post


Link to post
Share on other sites

FYI when using the LIKE command, you need to add the % variable. Here are a couple examples

SMS_G_System_SoftwareFile.FileName like "%foo.lnk"- will show all files with foo.lnk 

SMS_G_System_SoftwareFile.FileName like "%.lnk" - will show all files with .lnk 

you get the idea

 

 

 

 

Share this post


Link to post
Share on other sites

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


×