# List all the Server Nodes here at the top.
$nodes = @("Core01", "Core02", "Core03")
$psPath = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"foreach ($nodein$nodes) {
Write-Host"Enabling PSRemoting on $node..."-ForegroundColorCyanInvoke-CimMethod-ComputerName$node-ClassNameWin32_Process-MethodNameCreate-Arguments @{
CommandLine = "$psPath -ExecutionPolicy Bypass -Command 'Enable-PSRemoting -Force'"
}
}