I am new with Powershell Studio and now I am trying to show the following script into a label:
$AllUsers
=
Get-ADUser
-Filter
*
-properties
PasswordExpired, PasswordLastSet, PasswordNeverExpires
|
Format-Table
Name, PasswordExpired, PasswordLastSet, PasswordNeverExpires
-AutoSize
-Wrap
|
Out-String
And the output isn't aligned, when I run the same script into powershell it gets aligned perfectly. What am I doing wrong?
How to show Format-table output into label control
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.
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.
Re: How to show Format-table output into label control
I have set the same font type and size for both the label as the form, but still it doesn't align. Is this what you mean by fixed font?
Re: How to show Format-table output into label control
That fixed the problem, thank you so much for the good help.