A. You should consider making use of the Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell - Restart cmdlet.
B. You should consider making use of the Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell - Restart -Source c:\mountdir\windows\winsxs cmdlet.
C. You should consider making use of the Uninstall-WindowsFeature Server-GuiShell–Remove cmdlet.
D. You should consider making use of the Set-ExecutionPolicy cmdlet.