Posts

Showing posts with the label powershell

How do I convert bytes into mb?

How do I convert bytes into mb? In my piped command I want the bytes to be displayed as megabytes. My command queries a list of computers and returns their physical memory. How do I do the conversion and where do I add it? $comp = Get-Content c:usersjasonbecomputerlist2.txt Get-WmiObject -Class Win32_ComputerSystem -computer $comp | select Name, Totalphysicalmemory |`Export-Csv c:usersjasonbePhysical_Mem.csv` 1 Answer 1 $comp = Get-Content c:usersjasonbecomputerlist2.txt Get-WmiObject -Class Win32_ComputerSystem -computer $comp | select Name, @{label="Totalphysicalmemory";expression={[int]($_.totalphysicalmemory/1mb)}}| `Export-Csv c:usersjasonbePhysical_Mem.csv` By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the webs...

Is there a Windows command shell that will display Unicode characters?

Is there a Windows command shell that will display Unicode characters? Assuming I have fonts installed which have the appropriate glyphs in them, is there a command shell for Windows XP that will display Unicode characters? At a minimum, two things that should display Unicode correctly: Here's what I've tried so far: No luck. I even tried installing custom fonts for cmd/PowerShell. PowerShell and cmd.exe seem to be Unicode-aware in the sense that I can copy/paste the non-printable box out of there and it will paste into other apps with the correct characters. Cygwin (?) seems to convert to the ? character and that comes through in the copy/paste. Any ideas? 12 Answers 12 This was a major issue in PowerShell v1. Version 2 is shipping with a "graphical shell" that corrects the problem, which is ultimately not with PowerShell, but with the Windows console host (which Cmd.exe also uses...