Hello, all
I’m starting to get closer, but not sure what I’m missing. I read up on pscustomobject and I did the following in the script. So in the first screen shot, I got the member properties from get-foghost -hostname $machinename | get-member
The screenshot called “before”, doesn’t have the location field.

What I did was created a pscustomobject by creating a variable called $member
so $member = new-object -typename psobject
The screenshot I did later was called “after”

I then did $member | get-member and it added location as you can see in the screen shot.
In the parameter, I did location = Westbury for example. Here’s some screen shots of my script.

code that I used to add location:

So I already have the plugin Location installed with values such as Woodbury and Edison.
I’m trying to get Powershell to just load my section from $location to location as seen below, but it’s not working despite I used the pscustomobject





