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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.