i want to delete some symbolic Links (Folder). I tried
(Get-Item "C:\Users\MIKROEG\AppData\Roaming\Microsoft\Windows\Network Shortcuts\*.*").Delete()
or
[string]$Nutzerpfad = "$env:APPDATA"
[string]$Destination = "$Nutzerpfad\Microsoft\Windows\Network Shortcuts\*.*"
[System.IO.Directory]::Delete($Destination, $true)
or
cmd /s rmdir C:\Users\MIKROEG\AppData\Roaming\Microsoft\Windows\Network Shortcuts\Test2
or
$alleordneranzeigen=Get-ChildItem -Path $Destination -Directory
foreach($ordner in $alleordneranzeigen)
{ Remove-Item -Path $ordner.FullName
}
but nothing works. The last one wants to delete recurse.
Can anyone help me?
[INK][1]