clip】 将命令行工具的输出重定向到Windows剪贴板【win】


将当前目录列表的副本放入Windows剪贴板

dir | clip

将readme.txt中的文本副本放置到Windows剪贴板上

clip < readme.txt

清除Windows剪贴板中的内容

echo off | clip

使用ipconfig命令显示所有网络信息,并将内容输出到Windows剪贴板

ipconfig /all | clip

将字符串 Hello 放入 Windows 剪贴板

echo Hello | clip

bootrec】 Repair or replace a partition boot sector(Win RE)【win】


Syntax

      BOOTREC /FIXMBR Write an MBR to the system partition.

      BOOTREC /FIXBOOT Writes a new boot sector onto the system partition.

      BOOTREC /SCANOS Scans all disks for Windows installations and display entries not currently in the BCD store.

      BOOTREC /REBUILDBCD Scans all disks for Windows installations and provide a choice of which entries to add to the BCD store.

/FixMbr does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove nonstandard code from the MBR.

Use /FixBoot if The boot sector was damaged or replaced.

Examples

Use Bootrec.exe to troubleshoot a "Bootmgr Is Missing" error.

If rebuilding the BCD store doesn't resolve the startup issue, you can export and delete the BCD store and then run this option again. By doing this, you make sure that the BCD store is completely rebuilt. To do this, type the following commands at the Windows RE command prompt:

bcdedit /export C:\BCD_Backup

c:

cd boot

attrib bcd -s -h -r

ren c:\boot\bcd bcd.old

bootrec /RebuildBcd

changepk】 Upgrade device Product Key to a supported edition of Windows 10.【win】


Syntax

      CHANGEPK /ProductKey NewProductKey

This can be used to move from Home > Pro Education, from Pro > Education, from Pro > Enterprise a full list of the supported Edition upgrades and downgrades is available on docs.microsoft.com

You can also upgrade using slmgr.vbs and a KMS client setup key.

Examples

Upgrade to Windows 10 Enterprise:

C:\> Cscript.exe c:\windows\system32\slmgr.vbs /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43

DelProf】 Delete windows user profiles.【win】


Does not work with Windows 7 or later. A good alternative is Helge Klein's Delprof2.

Delprof2 is syntax compatible with the original Delprof by Microsoft.

In the Windows 10 GUI right-click My Computer | Properties | Advanced System Settings | User Profiles | account | Delete

Syntax

      DELPROF [options days]

Key

   /Q Quiet, no confirmation.

   /I Ignore errors and continue deleting.

   /P Prompts for confirmation before deleting each profile.

   /C:\computer_name

           Delete profiles on a remote computer.

   /D:Number_of_days

           Only delete profiles that have been inactive for

           'X' Number of days (or greater)

   /R Delete roaming profile cache only

Example:

delprof /D:14

Run Delprof2 on a remote PC (with PowerShell)

PS> Invoke-command -computername 'workstation64' -scriptblock {& "C:\utils\delprof2.exe" '/q'}

分类列表:


  1. arp
  2. az
  3. azure
  4. cleanmgr
  5. clip
  6. cls
  7. DelTree
  8. dir
  9. ipconfig
 10. route
 11. shutdown

腾图小抄 SCWY.net v0.03 小抄561条 自2022-01-02访问317098次