DiskSpd is a utility for generating a load on a disk system and measuring its performance.Continue reading “DiskSpd. Windows IOPS Test”
I will describe the procedure for adding the Hyper-V role to Windows Server:
1) Open “Server Manager“, select “Action” – “Add Roles” at the top of the menu.
Continue reading “Install Hyper-V”
I once needed to connect a network drive to make a backup copy of the system, but an error occurred when I executed the connection command:
C:\Users\Administrator>net use K:\\192.168.0.5\dir /persistent:no /user:name password System error 1231 has occurred. The network location cannot be reached. For information about network troublesho oting, see Windows Help.
Later I determined that in the connection properties on the local network (also called Ethernet and Local Area Connection), the checkboxes for “Client for Microsoft Networks” and “File and Printer Sharing for Microsoft Networks” were removed.
After I ticked these components and applied, the disk successfully connected:
C:\Users\Administrator>net use K:\\192.168.0.5\dir /persistent:no /user:name password The command completed successfully.
Error 1231 can also be displayed if, for example, the Netbios ports are blocked on the firewall or on the provider’s equipment so that users do not see the shared disks.
See also my article – Installing and Configuring Samba on Linux
On the test, I will configure the FTP server on Windows Server 2008 R2.
Open the “Server Manager”, it can be found in the menu “Start” – “Administrative Tools”.
If the “Web Server IIS” role is installed, then select it and then click “Add Role Services” (not Add Roles), check “FTP Server” and click “Next” and “Install”.
If the “Web Server IIS” role is not installed, in the “Roles” click “Add Roles”, select “Web Server IIS”, remove the tick from unnecessary components and check “FTP Server”, then click “Next” and “Install”.
Open “IIS Manager”, click “Add FTP Site …”, specify any name and path to the directory where the data will be stored, in the next window we will indicate which users are allowed to connect.
On the left we select the created FTP site, open “FTP Authentication” and activate “Basic Authentication”.
This completes the basic configuration of the FTP server and can be connected to it.
See my other articles on the topic Windows Server.
For example, I will make a backup copy of Windows Server 2008 R2 and describe the process by items:
1) Open the “Server Manager”.
2) Select “Features” – “Add Features”, check “Windows Server Backup” and “Command-line Tools”, click the “Install” button and wait for the installation to complete.
3) Open the “Start” menu and select “Windows Server Backup”.
For the test, I clicked “Backup Once”, in the window that appears, I select the “Custom” configuration type and ticked the C drive and all the oslat except for the other local disks if they are (for example, drive D) in the next window, you can select the storage type where the backup a copy, for example “Local disks” and specify drive D, or “Remote shared folder” and specify the path, I was just running Samba on one of the Linux servers, so I connected the network folder and chose this option.
See also my article – Installing and Configuring Samba on Linux
After the process is complete, the folder “WindowsImageBackup” with a backup will appear on the disk or network share.
To restore the system from this backup, you can similarly click the “Start” – “Windows Server Backup” menu and select this backup, or if the server does not start, then start the Windows startup disk, select “System Restore” and specify this backup.
To begin, open the command line by clicking on the shortcut in the Start menu or typing the command “cmd” in the “Run” line.
Here is an example of viewing the current configuration:
netsh interface ip show config
View a list of network interfaces:
netsh interface ipv4 show interfaces
An example of configuring static parameters for an interface named Ethernet 2:
netsh interface ip set address name="Ethernet 2" static 192.168.0.101 255.255.255.0 192.168.0.1 1
netsh interface ipv4 set address name="Ethernet 2" source=static address=192.168.1.2 mask=255.255.255.0 gateway=192.168.1.1 netsh interface ipv4 add dnsserver name="Local" address=184.108.40.206 index=1
Example of obtaining parameters for the Ethernet 2 interface by DHCP:
netsh interface ip set address name="Ethernet 2" dhcp
Example of obtaining the DNS parameters for the Ethernet 2 interface by DHCP:
netsh interface ip set dns "Ethernet 2" dhcp
Export the current configuration to a file:
netsh -c interface dump > d:cfg1.txt
Importing a configuration from a file:
netsh -f d:cfg1.txt
For Windows Server to respond to PING requests, you must enable them in the firewall.
To do this, open the rule in the firewall “File and Printer Sharing (Echo Request — ICMPv4-In)” and tick the “Enabled(Enabled)“, similarly for the sixth version “File and Printer Sharing (Echo Request — ICMPv6-In)“.
In order for the system to respond to PING requests only for specific IP, there is also a rule in the tab in the settings “Scope“, where “Remote IP Address” pushing “Add” specify the desired IP-addresses.
From the command line, you can configure this rule like this:
netsh advfirewall firewall set rule name= "File and Printer Sharing (Echo Request — ICMPv4-In)" new enable=yes action=allow profile=any remoteip=192.168.5.0/24
Either (on / off):
netsh firewall set icmpsetting 8 netsh firewall set icmpsetting 8 disable
From PowerShell like this:
Set-NetFirewallRule -Name FPS-ICMP-ERQ-In -Enabled True -Profile Any -Action Allow
I noticed once on one HP server, after installing Hyper-V, that virtual workstations are not being launched, giving the following error:
An error occurred while attempting to start the selected virtual machine(s).
Virtual machine could not be started because the hypervisor is not running.
As it turned out, the problem was in the Intel (R) Virualization Tech not activated in BIOS, after changing from “Disabled” to “Enabled” and start the system, the virtual workstations were successfully launched.
On the test I give an example of setting up a VPN server in Windows Server 2008 R2.
First of all, install the role:
1) Open the server manager and click on the link “Add role“.
2) Select the Network Policy and Access Services role and click “Next“.
3) Select “Remote Access” and click “Next“.
4) Click “Install” and after the installation is complete, click the “Close” button.
Now go to the setup:
1) Open the server manager, open the “Roles” branch, select the Network Policy and Access Services role, right-click on “Routing and Remote Access“, select “Configure and enable routing and remote access“.
2) In the first window click “Next“, in the next we’ll select “Custom configuration“, click the “Next” button, tick three items: Network Address Translation (NAT) and Local Area Networking (LAN routing), click Next and “Done“.
In the window that appears, click “Launch service“.
3) We’ll add an address pool for clients by opening the “Server Manager” – “Roles” – “Network Policy and Access Services“, right-click on “Routing and Remote Access” and select “Properties“.
In the “IPv4 tab, select” Static address pool “and add any range after clicking the “Add” button.
In order to be able to connect to a VPN server, for example, from the iPhone (via L2TP), in the “Security” tab, tick “Allow custom IPSec policies for L2TP connection” and specify the key .
4) Now configure permissions for users. Go to “Server Manager – Configuration – Local Users and Groups – Users“:
Open “Properties” of the desired user and on the Dial-in tab, where “Network Access permission” select “Allow access“.
5) Add NAT rules, the necessary routes and restart the service by right-clicking on “Routing and Remote Access” – “All Tasks” – “Restart “.
For the VPN to work, ports are used and should be opened:
TCP 1723 (for PPTP)
TCP 1701 and UDP 500 (for L2TP)
TCP 443 (for SSTP)
Connection logs can be seen in the C:\Windows\System32\LogFiles directory
It took one day to add a user to Windows 10 from the command line, because nothing happened when the add button was pressed from the control panel.
The first step is to start the command prompt as administrator, for this, in the start menu, type “cmd” or simply find the shortcut “Command line” and click on it with the right mouse button select “Run as administrator “.
At the command prompt, execute the add user command (where NAME is the user name):
net user NAME /add
Finish, the new user can already be seen in the “Control Panel\User Accounts\User Accounts\Account Management“