-
Is any way to paste multiple line information to the PowerShell? Usually I am saving it to the .txt or .csv before executing the script. For an example when I am creating new users.
-
Yep. This what I am trying to do.
-
Normal 0 false false false EN-US X-NONE X-NONE Thanks a lot. It works. But let me explain what I am trying accomplish. I’d like to email hash table as a body of the message to make it look nicer. Does it make sense? send-Mailmessage –to …… -body $DataIN -BodyAsHtml
-
Thank you. It is close to what I am trying to accomplish. Can it be done without saving to disk?
-
I am creating an array from the data collected from the different sources and trying to covert array to HTML. It works if the source is .NET object and does not for created array. Any thoughts? $DataIN = @{“User Name” = “John Doe”; “Computer Name” = "MyWorkstation"; “Serial Number” = "334455"} $MessInfo1 = $EmpNumbers | ConvertTo-HTML $MessInfo1 | Out-File "$PWD\MessInfo.html" Invoke-Expression "$PWD\MessInfo.html"
-
Sorry. Did not cleaned up: I am creating an array from the data collected from the different sources and trying to covert array to HTML. It works if the source is .NET object and does not for created array. Any thoughts? $DataIN = @{“User Name” = “John Doe”; “Computer Name” = "MyWorkstation"; “Serial Number” = "334455"} $MessInfo1 = $DataIN | ConvertTo-HTML $MessInfo1 | Out-File "$PWD\MessInfo.html" Invoke-Expression "
-
Perfect. Thanks a lot.
-
Trying to export specific properties to txt using line code. Add-content supposed to accept pipeline input ByPropertyName. Any thoughts? Get-Process | Where-Object {$_.Handles -gt 500} | Add-Content d:\Output\test.txt -Value "($_.ProcessName)","($_.handles)"