Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 3 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Hello,
in my test environment i searching for all send and received mails on an exchange server to get the total size and total items on a daily basis. All is working fine. But when i display the results, they are in a wrong order. How can i change the order so that the oldest one is the first entry?
@{Day=21.01.21; Total send=0; Total send size (GB)=0; Total received=0; Total received size (GB)=0} @{Day=20.01.21; Total send=0; Total send size (GB)=0; Total received=0; Total received size (GB)=0} @{Day=19.01.21; Total send=0; Total send size (GB)=0; Tota
l received=0; Total received size (GB)=0} @{Day=18.01.21; Total send=0; Total send size (GB)=0; Total received=0; Total received size (GB)=0} @{Day=17.01.21; Total send=0; Total send size (GB)=0; Total received=0; Total received size (GB)=0}
$SendReceivedMailsDaysOutput | Sort-Object -Property Day -Descending
I strongly recommend that you learn PowerShell before proceeding. Guessing will not work and learning PowerShell will also teach you how to read the documentation and help.
paddy75 wrote: ↑Fri Jan 22, 2021 4:04 am
sorry when I'm to stupid. I'm still learning and a forum is for beginners and advanced guys. And by the way, this answer was not very friendly.
Why would you say that? Your question and the guess at how to use a CmdLet show you have not taken time to learn PowerShell. I wanted you to understand that you cannot learn any advanced technology by guessing. Also learning how to use PowerShell would have given you the answer and helped you to correctly understand the help docs. You tried to use a CmdLet in a way that tells me that you were trying to copy something you saw somewhere and didn't understand. The remedy is to use teh book or other learning resources to learn the basics. This is how all of technicians learn to use new technology. It is the fastest way and helps us to avoid making simple mistakes.
The link I posted is for a free book that, in my opinion, is one of teh best for anyone without programming training to use to learn programming through PowerShell. It is also written by well experienced admins with deep experience with Windows and PowerShell. It will also show you how and why PowerShell was developed specifically for admins and to assist them in their work. Even though I have decades of programming experience and have used PowerShell since before it was beta I have read that book and others as a quick way to review and improve my skills. It is just how we engineers have been trained.
This topic is 3 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.