ソースを参照

fixed delimiter for input + added verbose output

Toastie 1 ヶ月 前
コミット
741f8ff039
1 ファイル変更3 行追加2 行削除
  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
 # 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
 # Initialize an array to hold the results
 $results = @()
 $results = @()
@@ -42,4 +42,5 @@ foreach ($email in $emailAddresses) {
 # Convert the results to a table and copy to clipboard
 # Convert the results to a table and copy to clipboard
 $results | Format-Table | Out-String | Set-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