command to create a new user from the command line
command to create a new user from the command line
- Use the command net user username password /add to create a new user with password from the command line.
- To give a new user administrative rights, use net localgroup administrators username /add
Rufus - boot USB
Rufus - boot USB - https://rufus.ie/pl/
Rufus to narzędzie pomagające formatować i tworzyć nośniki rozruchowe USB, takie jak dyski flash USB/pendrive, karty pamięci itp.
Może Ci się szczególnie przydać. gdy:
- chcesz utworzyć nośnik instalacyjny USB z rozruchowego obrazu ISO (Windows, Linux, UEFI itp.)
- chcesz pracować na komputerze, który nie posiada zainstalowanego systemu operacyjnego
- chcesz wgrać nowy BIOS lub inne oprogramowanie przez DOS
- chcesz uruchomić niskopoziomowe narzędzie
Mimo swojego małego rozmiaru, Rufus posiada wszystko czego potrzebujesz!
A poza tym, Rufus jest szybki. Na przykład, jest prawie dwa razy szybszy od UNetbootin, Universal USB Installer lub Windows 7 USB Download Tool, podczas tworzenia nośnika instalacyjnego USB systemu Windows 7 z obrazu ISO. Jest także trochę szybszy podczas tworzenia nośników rozruchowych USB systemu Linux z obrazów ISO.
Enable or Disable RDP - Registry (Windows)
nable or Disable RDP - Registry (Windows)
Method 1: CMD
You can use the change logon command to display the status of current logons or to disable and enable logons from Terminal Services clients.
When you disable logons, current users are NOT affected, but new client sessions will NOT connect to the server.
NOTE: You must have administrative privileges to use the change logon command.
When you open a CMD prompt on the terminal server and type change logon /?, you receive:
Enable or disable session logins. CHANGE LOGON \{/QUERY | /ENABLE | /DISABLE\} /QUERY Query current session login mode. /ENABLE Enable user login from sessions. /DISABLE Disable user login from sessions.
NOTE: Logons from the console session are not affected.
NOTE: If you restart the server, logons are enabled.
NOTE: If you disable logons from a client session and then log off, you must log on to the console to enable further logons.
NOTE: When you disable logons, you receive: Session logins are currently DISABLED. When you enable logons, you receive: Session logins are currently ENABLED.
NOTE: When logons are disabled, a client attempting to connect will receive:
Remote logins are currently disabled.
Method 2: Using Registry
Allow or prohibit Remote Desktop connections to your Windows machine through Command Prompt or PowerShell.
Run the required command from shell with Administrative privileges.
To enable RDP:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
To disable RDP:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
Solution
Often administrators need to have exclusive access to the server and be able to block such access by users. In such situations, it is required to temporarily disable logging in via the RDP protocol. We do this with the commands shown.
Method 2: Using PowerShell
To enable RDP with the PowerShell, use the following steps.
Option 1
To enable RDP:
- Launch PowerShell as Administrator.
- Type the following command and create a script block and use the Invoke-Command cmdlet:
1
|
Invoke-Command –Computername “server1”, “Server2” –ScriptBlock {Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" –Value 0}
|
NOTE: Enabling RDP through PowerShell will not configure the Windows Firewall with the appropriate ports to allow RDP connections.
Type the following:
To disable RDP with the PowerShell, use the following steps.
- Launch PowerShell as Administrator.
- Type the following command:
1
|
Invoke-Command –Computername “server1”, “Server2” –ScriptBlock {Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" –Value 1}
|
Method 3: Use Group Policy
If you have numerous Servers and/or Workstations that you need to enable RDP on and they are in the same Organization Unit structure in Active Directory you should enable RDP through Group Policy.
To enable RDP Using Group Policy.
- Launch the Group Policy Management Console (GPMC)
- Either edit an existing Group Policy Object (GPO) or create a new GPO.
- Navigate to the following GPO node:
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections