Symbolic Link In Windows «No Ads»
static void RemoveLink(string path)
if (Test-Path $Link) Write-Error "Link already exists: $Link" return symbolic link in windows
$item = Get-Item -Path $Path -Force if ($item.LinkType -notin @("SymbolicLink", "Junction")) Write-Error "Not a symlink or junction: $Path" return symbolic link in windows
Remove-Item -Path $Path -Force Write-Host "🗑️ Removed: $Path" -ForegroundColor Yellow switch ($Action) "Create" if (-not $LinkPath -or -not $TargetPath) Write-Host "Usage: -Action Create -LinkPath <path> -TargetPath <path> [-Directory] [-Junction] [-Relative]" return symbolic link in windows
function Create-Symlink param([string]$Link, [string]$Target, [bool]$IsDir, [bool]$UseJunction, [bool]$UseRelative)