copy files recursively cmd

S:\lim2021fwd>for /r %i in (“P207.mdb”) do xcopy /Y “%i” s:\someplace

If you are using this in a batchfile you should double the % like this:

for /r %%i in (foo???.txt) do xcopy /Y "%%i" g:\someplace

Windows Ultimate Performance Plan

To enable Ultimate Performance mode in Windows 10, follow these steps:

  1. Search for Command Prompt in the Start menu.
  2. Right-click the Command Prompt result.
  3. Choose “Run As Administrator.”
  4. In Command Prompt window, type the following command:
  5. powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61
  6. Press Enter.

Windows10/11 Losing Mapped Drives (Error59 etc)

Disable Fast-boot through the Control Panel

  1. Press the Windows key on your keyboard, type in Power Options, and then press Enter .
  2. From the left menu, select Choose what the power buttons do.
  3. Under the Shutdown settings section, uncheck the box next to Turn on fast startup (recommended).
  4. Click the Save changes button.

Turn off the auto-disconnect feature

Windows will drop idle connections after a specified time-out period, I think it is 15 minutes by default, to prevent wasting resources. You can, however, easily re-establish the connection manually.

If you wish to turn off the auto-disconnect feature, type the following in an elevated command prompt and hit Enter.

net config server /autodisconnect:-1

Turn off auto-tuning network

If it occurs while copying large files over network drives, it could be due to the auto-tuning network.

To turn it off, open an elevated command prompt windows, type the following, and hit Enter:

netsh int tcp set global autotuninglevel=disabled

Go to Device Manager, network adapters and find the ethernet one.

– right click for properties – advanced 

Disable Energy efficient ethernet (and or green energy) and Wake on magic packet.

windows error 59 copying over network

Registry Settings

These registry values must be created on the SMB gateway, which is specified in the repository settings as “Gateway server”. If the gateway is set to “automatic”, add these registry values to all Windows servers managed by Veeam Backup & Replication.

  • NetUseShareAccess
    For Veeam B&R 8.0.0.917 or later, the following registry value allows Data Movers to open backup files by a resilient method similar to the Windows net use command.
     Key: HKLM\SOFTWARE\Veeam\Veeam Backup and Replication\
    DWORD: NetUseShareAccess
    Value: 1
    Note: If credentials are required, specify Domain\User or Host\User in the repository settings. .\User credentials are not supported with NetUseShareAccess. For example, specify “NAS-01\Admin” instead of “.\Admin”.
     
  • SessTimeout
    This increases the amount of time the Windows SMB client will wait for a response from an SMB server before it aborts the connection. The default timeout is one minute.
    Note: Reboot Required
     Key: HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\
    DWORD: SessTimeout
    Value: 600
    Note:This is a value in seconds. Try a value of 600 decimal (10 minutes).
     
  • TcpMaxDataRetransmissions
    This increases the number of times the Windows TCP implementation will retransmit a data segment before it aborts the connection.
    Note: Reboot Required
     Key: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
    DWORD: TcpMaxDataRetransmissions
    Value: 10 (Default: 5)
Prerequisites:
  Ensure the the target machine has PowerShell Remoting Enabled (as it's Disabled by default)

PS C:\Users\kimconnect\Desktop\Notes> Enable-PSRemoting -Force
WinRM has been updated to receive requests.
WinRM service type changed successfully.
WinRM service started.
WinRM has been updated for remote management.
WinRM firewall exception enabled.
Alternative method:
a. Get PSExec: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec > extract copy contents into %windir% or "C:\Windows"

b. Run this command:
psexec \\hdqfswp001 reg add “HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters” /v SessTimeout /t REG_DWORD /d 3600 /f

Add this registry key to increase File Session Timeout:

$serverName="FILESERVER01"
Invoke-Command -ComputerName $serverName -ScriptBlock {reg add “HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters” /v SessTimeout /t REG_DWORD /d 3600 /f }

To Reset TCP / IP Stack in Windows 10.

1. Click the Start button in the bottom left corner of the screen.

windows start button


2. Type Command Prompt in the Search bar. Then right-click on the Command Prompt icon, and select Run as administrator.

command prompt/run as administrator button


3. If prompted, select Yes to allow changes to be made to computer.

4. Type in netsh int ip reset, and press Enter.

reset tcp/ip stack

Disable HPET (High Precision Event Timer)
Disable Hardware-accelerated GPU scheduling

Automount VHD Windows10

Note: This method utilizes PowerShell commands which work only when the Hyper-V feature is enabled. You need to activate Hyper-V on your PC to proceed.

To Automatically Mount VHD or VHDX File on Startup in Windows 10,

  1. Open Administrative Tools.
  2. Click the Task Scheduler icon.Administrative Tools Control Panel
  3. In the Task Scheduler library, click on the Create Task… link on the right.Windows 10 Create Task Link
  4. In Create Task dialog, fill in the Name box some meaningful text like “Automount of my VHD Drive”.Windows 10 Automount VHD Task Name
  5. Set the options as follows:
    – Configure for Windows 10.
    – Run whether user is logged on or not
    – Run with highest privileges boxWindows 10 Shutdown Event Task Options
  6. Switch to the Triggers tab and click on the New… button.Windows 10 Triggers Tab
  7. Set the Begin the task option to At startup.Windows 10 Automount VHD Task Trigger 1
  8. Select to the Actions tab, and click on the New button.Windows 10 Task Scheduler New Action Button
  9. In the Program/script text box type powershell.exe.Windows 10 Task Scheduler New Action PowerShell Exe
  10. Type the following in the Add arguments text box: Mount-VHD -Path "Full\path\to\your\VHD or VHDX\file". Change the Full\path\to\your\VHD or VHDX\file portion  to the actual full path of the VHD/VHDX file you want to have automatically mounted at startup.Windows 10 Automount VHD Task ActionWindows 10 Automount VHD Task Action Created
  11. Switch to the Conditions tab and disable the option Start the task only if the computer is on AC power.
  12. Click on the OK button to create the task.
  13. Type your user account password (or other administrative user account credentials).Windows 10 Save Credentials

You are done!

Notes:

  • If your VHD file is encrypted with BitLocker, you may need to add a delay to make a credential prompt appear after you sign in to Windows. Enable the Delay task for option on the New Trigger page, or edit the existing trigger. 30 Seconds should be enough.Windows 10 Automount VHD Task Trigger 2
  • You can disable this task to temporarily stop mounting your VHD/VHDX file at startup. You can re-enable it when needed.Windows 10 Automount VHD Disable Task
  • To permanently disable the VHD file auto-mount, delete your task under Administrative Tasks > Task Scheduler > Task Scheduler Library.Windows 10 Automount VHD Delete Task

That’s it.

windows 10 enterprise ubuntu shares

  • You can enable the legacy SMB client to access network devices using SMBv1 protocol via the Control Panel (Control Panel -> Programs and Features -> Turn Windows features on or off -> SMB 1.0 / CIFS File Sharing Support -> SMB 1.0 / CIFS Client). In addition, you can access the features installation dialog by running the optionalfeatures.exe command.
  • If you use anonymous access to connect NAS or other computers, you need to enable the insecure guest logon policy. In Windows 1803/1709 it blocks access to shared network folders over the SMB 2.0 protocol under an anonymous (guest) account. To do this, in the Windows 10 Local Policy Editor (gpedit.msc), enable the Enable insecure guest logons policy in the GPO section: Computer Configuration -> Administrative templates -> Network -> Lanman Workstation.

900gb Ext HDD->HDD copy test

Dell Inspiron 15 3567
12GB DDR4 2400mhz/2 x Seagate 1TB Expansion
Source : Seagate 1TB -> Usb3.1 port leftside
863 GB (926,755,439,240 bytes)
1,233,950 Files, 6,376 Folders
Destination : Seagate 1TB -> Usb2 port rightside

Disabling Windows 10 Consumer Experience

Windows 10 Consumer Experience adds tiles to the Start Menu for things like Candy Crush, Solitaire, and other non-business applications. There’s a simple way to disable this. Note that this does not remove any of the built-in apps like Calendar, Mail, or even Xbox.

Group Policy

The best and most practical way to disable this would be Group Policy. There’s a setting called “Turn off Microsoft consumer experiences” located at Computer Configuration > Administrative Templates > Windows Components > Cloud Content”. If you enable this policy, the extra stuff will go away.

Maximum unique TCP connections allowed by license in Windows 10

Problem:
Receiving the “TCP/IP has reached the security limit imposed on the number of concurrent TCP connect attempts” error in event viewer for Event ID 4226? A limit was first imposed back in XP SP2, with a concurrent connection limit of ten different connections per one second. 

(Number of half open connections)

Although most users won’t notice a difference in network activity if it’s increased, there is a registry value that can be set to zero to disable the maximum number of connections allowed.

This would be helpful for anyone using a download manager or torrent program that allows many simultaneous connections at once.

Solution:


Open “regedit” and navigate to“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters.”

add a dword32 “EnableConnectionRateLimiting”set to “0” hex

Disabling Multiple Processes on Google Chrome

Process Per Site

If you don’t want Chrome to open a new process for every single tab, its possible to set the browser to create only a single process for multiple tabs all browsing the same site. To change the setting, right-click the Google Chrome icon in your “Start” menu and select “Properties.” Click the “Target” text box and scroll to the end of the line. Insert the phrase “–process-per-site” after the end of the text currently in the box and click “Apply.”