I used the following command lines to create a shortcut using powershell for network share.
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("C:\Users\Public\Desktop\shortcut.lnk)
$Shortcut.TargetPath = "\\network share"
$Shortcut.Save()
The shortcut created has target type as file instead of file folder.The shortcut created manually is of type file folder.Can someone help to create a shortcut for the folder with target type as file folder using powershell or any other scripts?