How do I get unique values from this array in PowerShell?

powershell, string, unique

Solution

You can try :

$unique = $DailyPathsToDelete | Get-Unique

Problem

Why is the code below returning `$null`? I'm trying to store just unique values. ``` $DailyPathsToDelete = @("C:\temp\IMG000483\","C:\temp\IMG000483\") $DailyPathsToDelete = Select-Object $DailyPathsToDelete -Unique ```

Original source