Windows 2016 Server Core Commands | HTML POINT

Windows 2016 Server Core Commands

1-Provides a simple menu for a number of basic tasks.


2-Add username and password:-
net user /add [username] [password]
3-Add as admin
net localgroup administrators [username] /add
4- How to change local user password
net user [username] [newpassword]
5- Edit file in window core
C:\>notepad [filename.txt]
6-Read the file in window core
Cat [filename]
7- How to Change Local or Domain Password Policy from Command Prompt
A-Type the following command and hit Enter:
secedit.exe /export /cfg C:\secconfig.cfg
B- notepad C:\secconfig.cfg

C- Now you can view and edit all of the relevant policies as shown below. In this example, we’ll disable the password complexity policy. So we replace PasswordComplexity = 1 to PasswordComplexity = 0, and change the value of MinimumPasswordLength to 0.

D- When done, save your changes. To load the edited file as your new policy configuration, use the following command:
secedit.exe /configure /db %windir%\securitynew.sdb /cfg C:\secconfig.cfg /areas SECURITYPOLICY

E- The new password policy will apply to all password changes and new password. After disabling the password complexity policy, you should be able to change Windows account password to whatever you like.
8-Create Folder Using CMD in Windows
Mkdir [foldername]
9- Create Multiple Folders Using CMD in Windows
md [foldername1] [foldername2] [foldername3]
10- To create a subdirectory
mkdir [foldername]\[subfoldername]
11-To make a directory in another drive without moving
md f:\ [foldername]
12-How to copy a file in MS-DOS and the Windows command line
copy [file.txt] c:\[Newlocation]
Copy a Folder to Another Folder and Retain its Permissions
xcopy c:\ [Oldfoldername] [ c:\ [Newfoldername]
13- How to move files and folders on the computer
move file.txt c:\[Newlocation]
OR move c:\users\file.txt c:\temp\newlocation.txt
OR mv c:\users\file.txt c:\temp\newlocation.txt

14- How to move multiple files to another location
move *.txt * c:\ [Newlocation]\
15-How-to find volume size & free space
PS C:\>Get-Volume
16-Initializing a disk
Note: All disks are initialized as GPT by default unless otherwise specified.
To initialize a disk as MBR, use the –PartitionStyle parameter. For example:
Initialize-Disk 4 –PartitionStyle MBR
17-Listing all disks that are offline
Get-Disk | Where-Object IsOffline –Eq $True
18-Bringing all offline disks online
Get-Disk | Where-Object IsOffline –Eq $True | Set-Disk –IsOffline $False
20-Listing all of the partitions on a specific disk
Get-Partition –DiskNumber
21-Creating a new partition on a new disk
New-Partition –DiskNumber -UseMaximumSize –AssignDriveLetter
23- Listing the volume for a specific drive letter
Get-Volume –DriveLetter
24-Formatting a volume
Format-Volume -DriveLetter
25-Combined Example: Format a New Disk
Get-Disk | Where-Object PartitionStyle –Eq “RAW”
Initialize-disk 3
New-Partition -DiskNumber 3 -UseMaximumSize -AssignDriveLetter | Format-Volume -NewFileSystemLabel “Mirror” -FileSystem NTFS
26-Set a static IP address
New-NetIPaddress -InterfaceIndex 12 -IPAddress -PrefixLength 24 -DefaultGateway

27- Set the DNS client server address:
Set-DNSClientServerAddress –InterfaceIndex 12 -ServerAddresses
28- List the running services
sc query or net start
29- Start a service
sc start or net start
30-Stop a service
sc stop or net stop
31- Retrieve a list of running applications and associated processes
32- Start Task Manager

Related Articles

Leave a Reply

Be the First to Comment!

Notify of