Powershell Project - IT Administration

I am fairly new to all of this: I have finished the code for this “IT Administration” project and it runs with no errors except the object “StorageServer4” attached to the variable “$servers” is not populating as it should in the switch statement. The HELP mentions to use the wildcard switch which never was gone over in the lesson. Here is a Gist of the code:

Any help would be appreciated.

In your switch statement, you want to add the server to one of the inventories, so you need to flip each of the statements from:

{$server += $dbServers}


{$dbServers += $server}

and so on!

And indeed that works!!! Amazing and thank you! That would have been a good thing to show in the Hints.

Thanks again!

1 Like