How do I display both the host name and boot time?
The code I’m trying:
systeminfo | find /i "host name" && "boot time"
I know I could use
systeminfo | find /i "host name"
systeminfo | find /i "boot time"
but I really don’t want to.
Basically I want the command to display the host name and boot time and ignore all else. How do I do that on one line? I know I’m missing something super simple here.
>Solution :
I have faced a similar problem before, and I may be able to help you out. If I understand your question correctly, you’re looking for a way to display both the host name and boot time on one line, using a single prompt. In that case, the following command should do the trick, ignore the curly brackets of course:
{systeminfo | find /i "host name" & systeminfo | find /i "boot time"}
Using the ‘&’ character will execute the two ‘systeminfo’ commands sequentially and output the results on the same line.
I wish you the best of luck with your project. Let me know if I can help with anything else.