Powershell - Pain Relief by R.T.Edwards
Monday, April 28, 2014
How to use Powershell to pad output using echo
$objs = Get-WMIObject -namespace root\cimv2 -class Win32_Battery
foreach($obj in $objs)
{
foreach($prop in $obj.Properties)
{
echo $prop.Name.PadRight(30, " ") = $prop.Value
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment