Forum Replies Created
April 13, 2020 at 10:51 am in reply to: Is there a batter way to display progress of Get-ChildItem with Write-Progress #218112
@Olaf – Thank you for your reply 🙂
Yes, you have right – Start-Sleep was just to see how code is working.
Code works quite well for my purposes, but I had some feeling that it can be written in the better way 😉
I’m beginner and I’m trying to improve my skills. Also thx for link to Best Practices. I’ll try to apply to them.February 25, 2020 at 2:18 pm in reply to: Command work in Powershell 7, but not in Powershell 6 and 5. #205941
@js: I added extra parenthesis and now it is working correctly.
@Sam Boutros: Indeed, this is that case, when PS 7 shows its advangage over previous PS editions.
Thank you all 🙂October 25, 2019 at 6:42 pm in reply to: How to convert results to properly display in columns? #185018
Rob thank you. I think this is what I wanted 🙂
Now I can run this script in loop for an hour, save ping results to csv file and create chart from it.October 25, 2019 at 1:32 pm in reply to: How to convert results to properly display in columns? #184919
Thank you Rob for reply, but this is not quite what I want.
Result from your code is like below:
Server Response ------ -------- google.com 67 onet.pl 11 gmail.com 119
And my goal is to have result like below:
google.com onet.pl gmail.com 67 11 119July 31, 2019 at 1:36 pm in reply to: Wildcards with 'Get-ADUser -Filter' and 'variable' #168745
It works 🙂
But this is really black magic….
Okay. Now I understand. Thank you 🙂
Gentlemen’s I want to thank all of you for such big part of knowledge 🙂 Now I have big problem – I must understand all of it 😉
I will practice suggested solutions and will choose best for my purposes.
Once again – thank you.
😉 … you don’t need to use the code from the gallery … you can learn from it.
Right 🙂 Thank you once again 🙂
Out-File, Set-Content, and Add-Content looks very promising for my purposes. I must read about differences between them.
Regarding PowerShell Gallery – I don’t want to use content written by someone else, because I want to learn PowerShell. But thank you for sugesstion 🙂
Hello kvprasoon 🙂
I use your code with Write-Information and its working 🙂
Write-Information -MessageData “Name: $(Get-CimInstance -ClassName Win32_Battery -Namespace root\CIMV2 | Select-Object -ExpandProperty Name)” -InformationAction Continue
But to be honest, I don’t understand this syntax…
“Name: $(Get-CimInstance -ClassName Win32_Battery -Namespace root\CIMV2 | Select-Object -ExpandProperty Name)”
Double quotes means that this is string for -MessageData parameter. But what dollar sign means? About what should I read to get more info about that syntax?
Hello Olaf, and thank you for reply 🙂
At this time I only want to display message in console, but in the future I’ll try to log all displayed informations to file.
So thinking about future, Write-Information is better, or should I use Write-Host to display info to console, and then Add-Content to write it to file?