XML editing and merging
You code looks fine to me. I'll just make some random comments.

You can split long lines like this for the sake of readability:

$numberOfCores = Get-WmiObject -class win32_processor numberOfCores |
    Select-Object -ExpandProperty numberOfCores


This comment is confusing to me:

# Remove the elements we are going to be replacing


You are removing &lt;httpHandlers&gt; but adding back &lt;httpRuntime&gt;. Was that intentional or a bug?

Why remove and create a new &lt;processModel&gt;? Why not just update the attributes in the original node? You would save on a few lines of code.

What happens if these nodes already have some attributes set? If you blow away the nodes, you will blow away those attributes. Was that intentional?

Why do you suddenly change style when creating &lt;system.net&gt;? Why not continue using CreateElement and so on?

In most places, you cast to [void] to get rid of the return values. In one place you use Out-Null. It's best to be consistent. Personally I would go with Out-Null since it is more the PowerShell way, and I think it looks nicer.

If you like, you can use the Select-Xml cmdlet instead of SelectNodes. Something like this:

$node = $machineConfig | Select-Xml /configuration/system.web


If you are going to overwrite the original file, it might be a good idea to make a copy of the original first. Add a timestamp to the filename or something.

It might be overkill in this case, but I would be inclined to make the code data-driven. That is, put all the changes to be done in a list at the top of the code and walk through the list in the code making the changes. That way people could see at a glance what the script does without having to read through all the code.