Set-PinnedApplication Function help

Can someone please let me know how i can run the Set-PinnedApplication function as user context to make sure the icons show up on the start menu. Thank you.

So the issue is that when i use SCCM to deploy the application, i have to select install as system or the user will be prompted for admin rights. But selecting install as system means when it runs the function to pin a shortcut, it doesnt pin for the current logged on user.

Any help would be greatly appreciated.