Windows
原创2022/4/1...大约 1 分钟
Windows
tips
设置任务栏切换成列表模式的窗口数量
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband
key name: NumThumbnails
key type: DWORD
example: set to 1
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband]
"NumThumbnails"=dword:00000001提示
use CRLF and UTF-16 LE!
Command-Line
REM Junction(Hard Link for Directory)
mklink /J T:\softs_pkg H:\maps\T\softs_pkg
mklink /J T:\softs_src H:\maps\T\softs_src
REM net use
net use X: \\VM-SVR-NAS\Work
net use Z: \\VM-SVR-NAS\PublicPowershell
NuGet
NuGet in C:\ProgramData\Microsoft\Windows\PowerShell\PowerShellGet\NuGet.exe
or
C:\Users\xxy\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet\NuGet.exe
User Modules
C:\Users\xxy\Documents\WindowsPowerShell\Modules
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine
# PowerShell Gallery
Install-Module -Name PowerShellGet -Force
Update-Module -Name PowerShellGet
Update-Module -Name PackageManagement
Publish-Module -Name WinBuilder -NuGetApiKey xxxxVirtual Disk
label
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultLabel]
@="System"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel]
@="Data"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\P]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\P\DefaultLabel]
@="App"psubst
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"P:"="\\??\\C:\\maps\\P"
"R:"="\\??\\C:\\maps\\R"Windows Server Core
Set Network Location
Set-NetConnectionProfile -InterfaceAlias Ethernet0 -NetworkCategory PrivateRemote Management
On GUI Side:
REM 等效
winrm set winrm/config/client @{TrustedHosts="RemoteComputerName"}
winrm set winrm/config/client @{TrustedHosts="*"}
Set-item wsman:localhost\client\trustedhosts –value *Disk Management
On GUI Side:
netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yesOn Core Side:
sc config vds start= auto
net start vdsFile System
NTFS behavior
REM disable last access on user mode
REM default value is 2
fsutil behavior set disableLastAccess 1Active Directory
MaxOfflineTimeInDays
wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig set MaxOfflineTimeInDays=120