My complete requirement !!
I have several DAGs in exchange environment, lets say 50 DAGs. I want to reboot all first nodes from each 50 DAGs at one time. Once after successful reboot of all first nodes then I will have proceed with second node and so forth. Before and after reboot I must do some health checks and log all results.
Up to what I finished my coding?
Where I struck?
Where I run all these?
Somewhere in Google found the below code. Please suggest if I can implement.
$command = ("notepad.exe") $process = [WMICLASS]"\\$ComputerName\ROOT\CIMV2:win32_process" $result = $process.Create($Command)
Please some one help me to finish this project.
Let's stop at your first "Where I am stuck" statement.
Please read this page of the Secrets of Remoting free ebook.
You will need to reach out to whoever can approve TCP port 5985 (and 5986) to be opened from your admin servers to your prod environment and educate them about the reasons, requirements and risks. All Linux and network administrators at my company can connect to TCP port 22 (SSH) of servers and devices without questions asked. Opening TCP port 22 to all Linux servers has the same risks attached as allowing PowerShell Remoting to Windows servers.
It is crucial for Windows management to get at least TCP port 5985 (Remoting) approved and opened in your network firewalls.
Watch the Channel 9 video linked here http://blogs.msdn.com/b/powershell/archive/2013/12/16/powershell-security-best-practices.aspx and go over the slides.
From about_Remote_FAQ: https://technet.microsoft.com/en-us/library/hh847845.aspx
IS WINDOWS POWERSHELL REMOTING SECURE?
When you connect to a remote computer, the system uses the user
To add additional protection, you can configure the remote computer
This is a tough one. The problem is this, it doesn't matter what Microsoft says, no one believes them when they say something is secure. The SecFreaks justifiably ignore Microsoft. So, how do you get your security folks to allow PowerShell Remoting?
1. Educate – PowerShell Remoting(WinRM) uses http and https. Internally using http is most efficient and has no security issues, however when crossing Firewall boundaries, or if you're using Remoting across the Internet, then configure it for https. Simple. Easy to manage, single port of secured access with https, so the Sec guys like it. Remember, we do our banking over https. It's pretty darn secure for Admins to use for system management.
You must be logged in to reply to this topic.