PowerShell Day-to-Day Admin Tasks [in a nutshell]

If you are aiming to optimize the use of your time by doing as much as possible via scripting, you will soon want to run scripts in parallel to save time. PowerShell does not demand that you run jobs one after the other; It has the means to launch actions whenever you wish and to obtain the results when you want them.

This article demonstrates how easily a Windows admin can achieve required Dev Ops skills by using Windows Automation Tasks. The article consists of 3 different areas;

  1. How to create PowerShell Scripts using a GUI tool
  2. Pre defined PowerShell script source [revised by Microsoft]
  3. How to Run the Created PS scripts [Task Scheduler & PS to EXE conversion]

Section 1:

LazyWinAdmin is a project released in 2012, a PowerShell Script that generates a GUI/WinForms loaded with tons of functions. This utility is very helpful for anyone managing workstations or servers.

Sections 2:

Here you will find hundreds of pre defined commands written in PowerShell, VB Script, Perl & Python. Only Minor Tweaks will be required, therefore you can use the given compiler to cross check the validity of the commandlets.

https://gallery.technet.microsoft.com/

Continue reading “PowerShell Day-to-Day Admin Tasks [in a nutshell]”

TCP Settings for Heavy Load on Windows OS

This topic describes how to tune Windows XP, Windows 2003, and Windows 2008 /2012 R1 & R2 operating systems for TCP/IP performance. “Tuning” involves adding several registry keys. To add a key to the registry, you can either edit it directly as described below. When you have finished adding or editing these registry keys, you must restart the Server.

In all versions of Windows, add the keys described below. Certain keys/values depend on the operating system installed (noted in the Value name column where different).

Subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters

Value Name
(DWORD 32-bit)
Value Data
Decimal)
Description
TcpTimedWaitDelay 30 This key determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server costs less than establishing a new connection. By reducing the value of this entry, TCP/IP can release closed connections faster and provide more resources for new connections. Adjust this parameter if the running application requires rapid release, the creation of new connections, or an adjustment because of a low throughput caused by multiple connections in the TIME_WAIT state.
MaxUserPort 32768 (minimum) This key determines the highest port number that TCP/IP can assign when an application requests an available user port from the system.
TcpMaxDataRetransmissions 5 (seconds) This key determines how many times TCP retransmits an unacknowledged data segment on an existing connection.
TcpNumConnections 16777214 Determines the maximum number of TCP connections that can be open simultaneously. If the value is 0, you cannot open a connection.