Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Can I build a string via sub-strings (don't know how to better describe this) without creating multiple lines of new variables?
Post Flair (click to view more posts with a particular flair)
Post Body

Starting with $TestReg = Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion'

I can individually get these values.

$TestReg.CurrentMajorVersionNumber = "10"
$TestReg.CurrentMinorVersionNumber = "0"
$TestReg.CurrentBuildNumber = "18363"
$TestReg.UBR = "592"

But I can't seem to glue these values together without creating and setting new variables first. I'm trying to find the most efficient way to do this for a specific script now but also the harder I search now, the more I want to know this for future projects.

I tried to concatenate "$var.name" "." "$var.name" etc but it stacks the entire $var together.

I tried to concatenate $var.name "." $var.name but it cannot combine system.int32

I tried using piping to Select, then Format-Table (to get rid of the select table headers) but then I remembered ft breaks the object pipeline if I recall correctly.

I've been googling for couple hours now and keep NOTing pieces like SQL and CSV but can't figure out how to do this.

What I want to do is get back the SCCM version "10.0.18363.592" string.

PS just in case that value is available somewhere else, I still would like to know how to break and build these pieces for future scripting.

Author
Account Strength
90%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
4,174
Link Karma
215
Comment Karma
3,959
Profile updated: 3 days ago
Posts updated: 3 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago