1

I am trying to create a symlink object on a user's desktop that points to a directory in the C:\ drive. I have tried using the New-Item cmdlet but Powershell 3.0 and lower does not have the functionality for anything other than files and directories.

The issue is that I am trying to create this script and push it out in a GPO to several computers. Some of these computers are running 32 and 64 bit, some are running Win 7 or Win 10. The majority of them are also running Powershell 3.0 or lower.

Is there an alternative to New-Item for creating symlinks on earlier versions of powershell?

1 Answer 1

2

You can try this :

C:\WINDOWS\system32>cmd /c mklink y:your/symlink z:your/destination

and if your destination is a repository :

C:\WINDOWS\system32>cmd /c mklink /d y:your/symlink z:your/destination
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.