Quellcode durchsuchen

fixed delimiter for input + added verbose output

Toastie vor 1 Monat
Ursprung
Commit
741f8ff039
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 3 2
      microsoft/office_365/get-sam-from-email.ps1

+ 3 - 2
microsoft/office_365/get-sam-from-email.ps1

@@ -13,7 +13,7 @@ and copies the results as a table to the clipboard.
 #>
 
 # Get the list of email addresses from the clipboard
-$emailAddresses = Get-Clipboard -Raw | ConvertFrom-StringData -Delimiter "`n"
+$emailAddresses = (Get-Clipboard -Raw).Split("`n")
 
 # Initialize an array to hold the results
 $results = @()
@@ -42,4 +42,5 @@ foreach ($email in $emailAddresses) {
 # Convert the results to a table and copy to clipboard
 $results | Format-Table | Out-String | Set-Clipboard
 
-Write-Host "Script completed. The results have been copied to the clipboard."
+Write-Host "Script completed. The results have been copied to the clipboard."
+$results | Format-Table | Out-String