Logon Script to Create Desktop and Startmenu Shortcut Links Dynamically
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Logon Script to Create Desktop and Startmenu Shortcut Links Dynamically
I am trying to create desktop and startmenu shortcut links and urls depending on conditions matched. I managed to put the below script together, See code attached...
So the above is supposed to verify user profile > desktop shortcuts and a .lnk, or .url and will create a shortcut if not present or check if it is a startmenu shortcut and create accordingly. I am not sure if the above approach is right ..Will it be possible if the source urls and lnks are populated in a textfile so the script always checks if the file has been populated based on same conditions and updates shortcuts accordingly. This could even be in the same file but maybe comma separated or something. Any ideas how this can be achieved?Re: Logon Script to Create Desktop and Startmenu Shortcut Links Dynamically
@Jvierra How do I refactor that process into the script attached, Is that the best approach to add lnks and urls dynamically?. That was my question . I am at the beginner level when it comes to posh and will need some pointers. A sample script could help.
Re: Logon Script to Create Desktop and Startmenu Shortcut Links Dynamically
I suggest learning how to use files in PowerShell.
Here is a book that will get you started in PowerShell the right way. It is downloadable and free. Most of your questions will be answered in the first few chapters.
https://www.sapien.com/books_training/W ... werShell-4
Here is a book that will get you started in PowerShell the right way. It is downloadable and free. Most of your questions will be answered in the first few chapters.
https://www.sapien.com/books_training/W ... werShell-4
Re: Logon Script to Create Desktop and Startmenu Shortcut Links Dynamically
Will have a look. Thanks for sharing
jvierra wrote: ↑Thu Mar 04, 2021 4:06 am I suggest learning how to use files in PowerShell.
Here is a book that will get you started in PowerShell the right way. It is downloadable and free. Most of your questions will be answered in the first few chapters.
https://www.sapien.com/books_training/W ... werShell-4