Creating hard and soft links using PowerShell

前端 未结 11 1725
攒了一身酷
攒了一身酷 2020-12-04 05:04

Can PowerShell 1.0 create hard and soft links analogous to the Unix variety?

If this isn\'t built in, can someone point me to a site that has a ps1 script that mimi

11条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 05:24

    I wrote a PowerShell module that has native wrappers for MKLINK. https://gist.github.com/2891103

    Includes functions for:

    • New-Symlink
    • New-HardLink
    • New-Junction

    Captures the MKLINK output and throws proper PowerShell errors when necessary.

提交回复
热议问题