das Einbinden einer Variable in einen powershellCall will einfach nicht funktionieren.
Egal, welche Anführungszeichen (einfach, doppelt, gar keine), die Variable wird einfach nicht ausgeführt.
Code: Alles auswählen
set $exitcode$ = powershellCall("Get-WmiObject -Class Win32_UserProfile | where {$_.LocalPath.split('\')[-1] -eq '$Profile$'} | foreach {$_.Delete()}")
Code: Alles auswählen
... where {$_.LocalPath.split('\')[-1] -eq '$Profile$'} ...
Gruß und Dank
Robert