May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Reboot Windows Server 2012 using Powershell

For occasions where you employ the shutdown command, then instead of typing -s, substitute -r.

# How to Reboot Server 2012 with PowerShell Restart-Computer

# How to Reboot with the built-in command Shutdown -r -m \\localhost

shutdown /r /t 0

 

Install and Remove DHCP SERVER Using PowerShell

Install DHCP SERVER Using PowerShell

 

PS C:\Users\Administrator> get-command -Module servermanager

CommandType Name ModuleName ———– —- ———- Alias Add-WindowsFeature ServerManager Alias Remove-WindowsFeature ServerManager Function Disable-ServerManagerStandardUserRemoting ServerManager Function Enable-ServerManagerStandardUserRemoting ServerManager Cmdlet Get-WindowsFeature ServerManager Cmdlet Install-WindowsFeature ServerManager Cmdlet Uninstall-WindowsFeature ServerManager

 

 

PS C:\Users\Administrator> Add-WindowsFeature -IncludeAllSubFeature -Name DHCP, RSAT-DHCP

Success Restart Needed Exit Code Feature Result ——- […]

Diskpart to Create and Format Partitions

To use the command line to bring a disk online, create a partition, and format it, run the following commands:

June 20th, 2014 | Category: 2012 SERVER | Leave a comment

windump

windows environment.

Its exactly the same as tcpdump for linux.

http://www.winpcap.org/windump/

However to get this working you will need WinPcap

http://www.winpcap.org/default.htm

Once installed this is a great tool to watch network traffic.

You can specify IP addresses, subnets, ports, interfaces and combinations of. I provide a few examples, but the documentation is great. And as […]

Netstat for windows

netstat -ano -p tcp | findstr “18812” netstat -ano -p tcp | findstr /R /C:”TCP[ ]*[0-9.]*:3099 ” netstat -ano -p tcp | findstr “.*:18812.*”

DDOS attack on Windows Server Netstat

check tcp/ip number of connection, run following commands in command prompt.=================== netstat -ano | find /i /c “:80″netstat -ano | find /i “80” ===================C:\>netstat -ano | find /i /c “:80” 14126

C:\>netstat -ano | find /i “80” TCP [::]:49154 [::]:0 LISTENING 980 UDP 0.0.0.0:500 *:* 980 UDP 0.0.0.0:4500 *:* 980 UDP [::]:500 *:* 980

[…]

Dsmod

Reset Password and Force Change at Logon for an Entire OU: dsquery user “OU=Singapore,OU=Staff,DC=rmohan,DC=com” | dsmod user -pwd Password1 -mustchpwd yes

Change “company” AD attribute for all Users in an Entire OU: dsquery user “OU=Singapore,OU=Staff,DC=rmohan,DC=com” | dsmod user -company “rmohan”

Return the DN of all users in an OU: dsquery user “OU=Singapore,OU=Staff,DC=rmohan,DC=com”

“CN=User1,OU=Singapore,OU=Staff,DC=rmohan,DC=com” “CN=User2,OU=Singapore,OU=Staff,DC=rmohan,DC=com” “CN=User3,OU=Singapore,OU=Staff,DC=rmohan,DC=com”

[…]

Importing and Exporting Active Directory Data

There are two ways to import and export Active Directory data:

1. LDIFDE: Data is exported from the AD object by object to a file in the Lightweight Data Interchange Format (LDIF) that is saved with a .ldf extension. Notepad or Wordpad can be used to edit the exported data. Furthermore, this utility can create, […]

2012 Offline Domain Join – Concept

t involves 2 steps: 1. Provisioning (On Domain Controller) 2. Offline Domain Join (On Client Machine)

Provisioning In this process, it will create an account for the client machine in Active Directory and will provide a file (BLOB) which will have the complete information about the domain controller and the domain which the client machine […]

Powershell

First, get some help

Get-Help What better place to start than with the command that will show how to get help with the commands. Get-Helpcan be used with any command. Maybe you’re curious how the Add-Computer command works. Simply typeGet-Help -Name Add-Computer into Powershell, hit enter, and be rewarded with command details such as Name, […]