|
-
Echo in Windows Powershell
I am trying to learn Windows Powershell so forgive if this sounds stupid. Basically I'm trying to count how many installed printers I have and then print it out on the screen with the output something like
There are 5 printers installed.
The code I am using is:
$count=Get-WmiObject Win32_Printer
echo 'There are' $count 'printers installed.'
But it prints it in this way:
There are
5
printers installed.
How can I get it to print on one line?
-
Never mind.. I figured it out. Use Write-Host instead of echo. Cheers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|