32 or 64 bit version of product: 64Bit
Operating system: Windows 10 with WMF 5.1
32 or 64 bit OS: 64 Bit
PowerShell Version:
Name Value
---- -----
PSVersion 5.1.15063.0
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.0
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Hey All,
I have a Forms project that I am working on and usually to not have any issues with updating a Label or Textbox's .text property with the contents of a variable but I am running into issues with this one.
Here is what I have on the form_Load event
Tried this as one solution..
Code: Select all
$Var = Get-ChildItem 'C:|FilePath' | sort LastWriteTime | select -last 1 | Select-Object LastWriteTime | ft -hidetableheaders
$textBox.Text = "$var"
Code: Select all
$Var = Get-ChildItem 'C:|FilePath' | sort LastWriteTime | select -last 1 | Select-Object LastWriteTime | ft -hidetableheaders
$textBox.Text = "$(Get-ChildItem 'C:|FilePath' | sort LastWriteTime | select -last 1 | Select-Object LastWriteTime | ft -hidetableheaders)"
Code: Select all
$Var = Get-ChildItem 'C:|FilePath' | sort LastWriteTime | select -last 1 | Select-Object LastWriteTime | ft -hidetableheaders
$textBox.Text = $var
Code: Select all
Microsoft.PowerShell.Commands.Internal.Format.FormatStartData Microsoft.PowerShell.Commands.Internal.Format.GroupStartData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.GroupEndData Microsoft.PowerShell.Commands.Internal.Format.FormatEndData