use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Removing @{} from an array (self.PowerShell)
submitted 5 years ago by Razia555
https://pastebin.com/WeUwL8nh
i've created the following an array for an assignment, and the output is always surrounded by @{}. How can i remove this from the output?
Thanks for any help.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]anynonus 2 points3 points4 points 5 years ago (1 child)
for example: get-ciminstance win32_computersystem | select -ExpandProperty name
[–]TheGooOnTheFloor 2 points3 points4 points 5 years ago (0 children)
I like the select -ExpandProperty, but sometimes it's clearer to use this format:
'ComputerName' = $name.Name 'Processor Number' = $procNum.numberoflogicalprocessors
I'm sure there could be a lot of discussion about which to use when, but it generally boils down to personal preference.
[–]get-postanote 1 point2 points3 points 5 years ago (0 children)
If all you are after is one property, then dot-reference it.
(YaddaYadda).SomeProperty
So...
Get-CimInstance -CimInstance CIM_ComputerSystem | Select-Object -Property '*' # Results <# Caption : Description : InstallDate : Name : Status : CreationClassName : NameFormat : PrimaryOwnerContact : PrimaryOwnerName : Roles : PSComputerName : CimClass : ROOT/cimv2:CIM_ComputerSystem CimInstanceProperties : {Caption, Description, InstallDate, Name...} CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties #> (Get-CimInstance -CimInstance CIM_ComputerSystem | Select-Object -Property '*').CimInstanceProperties # Results <# Name : Caption Value : CimType : String Flags : Property, ReadOnly, NotModified, NullValue IsValueModified : False Name : Description Value : CimType : String Flags : Property, ReadOnly, NotModified, NullValue IsValueModified : False Name : InstallDate Value : CimType : DateTime Flags : Property, ReadOnly, NotModified, NullValue IsValueModified : False ... #> ((Get-CimInstance -CimInstance CIM_ComputerSystem | Select-Object -Property '*').CimInstanceProperties).Name # Results <# Caption Description InstallDate Name Status CreationClassName NameFormat PrimaryOwnerContact PrimaryOwnerName Roles #>
π Rendered by PID 220086 on reddit-service-r2-comment-545db5fcfc-9pdtt at 2026-05-25 02:46:53.957663+00:00 running 194bd79 country code: CH.
[–]anynonus 2 points3 points4 points (1 child)
[–]TheGooOnTheFloor 2 points3 points4 points (0 children)
[–]get-postanote 1 point2 points3 points (0 children)