Windows troubleshooting

The Print Spooler service terminated unexpectedly:

net stop spooler
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler
https://it.ros-kit.ru/help/computers/kak-ochistit-ochered-pechati/

Fix DHCP service cannot start: error 5: Access Denied:

https://www.wintips.org/how-to-fix-dhcp-service-cannot-start-access-is-denied/

Windows Update Error 0x80070422 while installing standalone update .msi:

– windows update service not running. Start it manually before installing .msi.

Windows 10 20H1 update error 0x8007001f MIGRATE_DATA:

Stop Windows Update
Remove c:\windows\SoftwareDistribution\Downloads
Remove c:\Windows_BT
Check HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. If the value in ProfilesDirectory is not set as default %SystemDrive%\Users, set it like this temporary, update Windows, and change back as it was before update.
Reboot.
https://superuser.com/questions/1602404/win10-upgrade-to-version-20h2-failed-how-to-determine-the-cause

Install Windows 11 on unsupporterd hardware:

Fresh install with boot from original ISO:
After getting error about unsupported hardware press Shift + F10, then type “regedit” in CMD window
Go to HKEY_LOCAL_MACHINE\SYSTEM\Setup
Create key “LabConfig”
Create DWORD BypassTPMCheck, BypassSecureBootCheck, BypassRAMCheck, BypassCPUCheck with “1” in each
Close regedit and CMD
Go back in setup window and continue the installation.
https://adminwin.ru/oshibka-this-pc-doesnvt-meet-the-minimum-system-requirements-to-install-this-version-of-windows/

Updating existing installation to Windows 11:
Extract install.wim from Windows 11 ISO
Open Windows 10 .ISO equal to Windows 11 .ISO you’ve decided to install with any CD image editor like UltraISO. Replace ./Sources/install.wim with install.wim from Windows 11 .ISO. Save with decided name.

Domain controller Kerberos login/password errors

https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/domain-controller-not-functioning-correctly

If you experience this symptoms:
– your secondary DC can’t resolve DNS names
– you see “Audit Failure” event ID 4625 with the name of your secondary DC in event viewer on your promary Domain Controller

Check that you have right Kerberos realm on the secondary DC in HKEY_LOCAL_MACHINE\SECURITY\Policy\PolPrDmN
Aquire Kerberos password change from Primary DC:
netdom resetpwd /server: /userd:domain\administrator /password:

“Cannot connect to the DRIVELETTER$ admin share to verify if folder YOURDECIDEDSHAREDFOLDER exists on computer COMPUTERNAME” error while configuring NFS share:

https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/problems-administrative-shares-missing
Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
If the AutoShareServer and AutoShareWks DWORD values in the LanmanServer\Parameters subkey are configured with a value data of 0, change that value to 1.

Error 0x800ccc14 in Outlook 2021 while creating new user profile:

https://answers.microsoft.com/ru-ru/windows/forum/all/после/fe32ecfd-2d08-43ae-91f9-401bda3ee803
If you’ve installed CryptoPRO before creating user profile in Outlook you’ll get this error. Remove the CryproPRO shit and create a profile without errors.

NTP

Set resync interval:

https://ru.wikihow.com/изменить-интервал-синхронизации-времени-в-Windows-7

 

Ntp control commands:

https://quaded.com/

Основные команды конфигурации w32tm
w32tm /register — Регистрация и включение службы со стандартными параметрами.
w32tm /unregister — Отключение службы и удаление параметров конфигурации.
w32tm /monitor — Просмотр информации по домену.
w32tm /resync — Команда принудительной синхронизации с заданным в конфигурации источником.
w32tm /config /update — Применить и сохранить конфигурацию.
w32tm /config /syncfromflags:domhier /update – Задаем настройку синхронизации с контроллером домена.
w32tm /config /syncfromflags:manual /manualpeerlist:time.windows.com – задать конкретные источники синхронизации времени по протоколу NTP.

Просмотр параметров (/query)
w32tm /query /computer:<target> — Информация о стутусе синхронизации определенной станции (если имя не указано — используется локальный компьютер).
w32tm /query /Source – Показать источник времени.
w32tm /query /Configuration — Вывод всех настроек службы времени Windows.
w32tm /query /Peers – Показать источники времени и их состояние.
w32tm /query /Status – Статус службы времени.
w32tm /query /Verbose – Подробный вывод всей информации о работе службы.

Синхронизация через Net time
Так же можно воспользоватся вспомогательной службой net time для синхронизации времени.
net time /setsntp:time.itmake.org — Задаем источник синхронизации.
net time /querysntp — просмотр информации о заданном источнике времени.
net time \\server.lan.local /set /y – Принудительная синхронизация с указанного источника.

 

Set NTP server via few commands:

w32tm /config /syncfromflags:manual /manualpeerlist:XXX.XXX.XXX.XXX

reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters” /v NtpServer /t REG_SZ /d XXX.XXX.XXX.XXX,0x9 /f
reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters” /v Type /t REG_SZ /d NTP /f

reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers” /v 1 /t REG_SZ /d XXX.XXX.XXX.XXX /f

Change Floppy drive letter

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
Look here for floppy drives, click on what you need, press F2, change letter. Reboot.

https://www.tomshardware.co.uk/forum/60125-45-change-floppy-drive-letters-disk-management-doesn

Windows Tuning

All Windows versions:

Show extensions of known file types:

ext.vbs:

HKEY_CURRENT_USER = &H80000001
strComputer = “.”
Set objReg = GetObject(“winmgmts:\\” & strComputer & “\root\default:StdRegProv”)
strKeyPath = “Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced”
objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
ValueName = “HideFileExt”
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue

 

Always show all icons and notifications in tray:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer!EnableAutoTray=0

 

Make Windows search inside file contents 1 & 2:

Type in content: into the search bar. Anything that you type after this prompt will be used as a content search term.

Search for Indexing Options in Start,
Go to Advanced,
Select the “Index Properties and File Contents” option,
Add needed files extensions if they are absent in list.

Go to Folder and Search Options,
On the “Search” tab, select the “Always search file names and contents” option.
Windows Server 2012:
Включить отобржение активности дисков в таксменеджере:
diskperf -Y
https://blogs.technet.microsoft.com/canitpro/2013/12/02/step-by-step-enabling-disk-performance-counters-in-windows-server-2012-r2-task-manager/

 

Disable Narrator forever (Windows + Enter hotkey):

Open regedit.exe.
Create the following key.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Narrator.exe
In that key, create a new string value named Debugger and assign it the value %1.

 

Disable text/ink collection:

HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization RestrictImplicitTextCollection REG_DWORD 1
HKLM\SOFTWARE\Policies\Microsoft\InputPersonalization RestrictImplicitInkCollection REG_DWORD 1

 

Disable “This app is preventing shutdown”:

HKEY_USERS\.DEFAULT\Control Panel\Desktop
Create new stringkey “AutoEndTasks” with value  “1”

reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v AutoEndTasks /t REG_SZ /d 1

 

Change user appearance via one file:


Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"UserPreferencesMask"=hex:00,20,04,00,80,00,00,00

In this example everything is disabled except: Peek, Thumbnail previews, Thumbnails instead of icons, Translucent selection rectangle, Window contents, Smooth edges, Drop shadows icons.

There is a software UserPreferencesMask calculator, but it doesn’t work on Windows higher than 7.
https://www.silisoftware.com/tools/tweakui.php

Also there is a complete list of registry values of each feature:
https://www.bleepingcomputer.com/forums/t/416401/advanced-system-settings-performance-to-all-user-accounts/#entry3467731

 

Enable Office automatic updates 1 & 2:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\15.0\Common\OfficeUpdate]
“EnableAutomaticUpdates”=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\15.0\Common\OfficeUpdate]
“HideEnableDisableUpdates”=dword:00000000

 

Show Product (License) Key stored in BIOS:
https://www.kiloroot.com/how-to-get-your-windows-activation-key-from-uefi-bios/

In Powershell:
wmic path softwarelicensingservice get oa3xoriginalproductkey

Create persistent disk from folder:
https://superuser.com/a/217621
https://superuser.com/questions/1734542/how-to-change-the-drive-label-after-mapping-a-drive-letter-to-a-folder
https://en.wikipedia.org/wiki/SUBST

Add a disk from folder:
reg add “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices” /v X: /t REG_SZ /d “\??\C:\DirectoryName” /f

Configure new disk’s volume name:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\X\DefaultLabel\
(DefaultValue) = Your Drive Label

Общий список баз 1С 8

Добавляем все нужные базы из-под пользователя в 1С.

В файле c:\ProgramData\1C\1cestart\1cestart.cfg пишем:
CommonInfoBases=\\Путь-до-списка-доступный-всем\список.v8i

Вписываем базы из %userprofile%\AppData\Roaming\1C\1CEStart\ibases.v8i в \\Путь-до-списка-доступный-всем\список.v8i

Очищаем %userprofile%\AppData\Roaming\1C\1CEStart\ibases.v8i

Windows GPO

Remove Apps from Start:
https://social.technet.microsoft.com/Forums/en-US/b694628c-0f34-419c-873c-8c5163a5261a/how-do-i-remove-all-programs-from-appearing-in-start-menu?forum=windowssteadystate

Change registry via reg file via GPO:
https://blogs.technet.microsoft.com/askds/2007/08/14/deploying-custom-registry-changes-through-group-policy/

Lock screen timeout:
Computer Conifg>Policies>Windows Settings>Security Settings>Local Policies>Security Options and find Interactive logon: Machine inactivity limit

Screen saver config:
User Config.>Admin. Templates>Control Panel>Persomalization
Enable screen saver
Prevent changing screen saver
Password protect the screen saver
Screen saver timeout
Force specific screen saver

https://community.spiceworks.com/topic/1416384-gpo-to-lock-the-computer-after-10-minutes-of-inactivity

 

Disable user confirmation while shadowing user’s session:

Local Group Policy – Administrative Templates – Windows Components – Remote Desktop Services – Remote Desktop Session Host – Connections

Chose – Set rules for remote control of Remote Desktop Services users sessions

https://community.spiceworks.com/topic/478662-rdp-disable-the-please-wait-for-user-to-respond-prompt

 

Enable or disable displaying file extensions (Active Directory only):

https://www.dtonias.com/show-hide-extensions-for-known-file-types/123

User Configuration – Preferences – Control Panel Settings – Folder Options
Here, right-click Folder Option and then click Folder Options (At least Windows Vista) in the New menu.
In the folder settings window that opens, uncheck Hide extensions for known file types on the Advanced tab. Click OK to save the Group Policy setting and then apply it through the Group Policy Management Console.

 

Allow user to log in locally:

Policy/Computer Configuration/Windows Settings/Security Settings/Local Policies/User Rights Assignment

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc785165(v=ws.10)

Folder Redirection HowTo:
https://www.grouppolicy.biz/2010/08/best-practice-roaming-profiles-and-folder-redirection-a-k-a-user-virtualization/

ESXi 6.0 Windows 7 VM failed to start with error: The operation on the file failed (14(Bad address))

После копирования виртуалки с windows 7, созданной в ESXi 5.5 на сервер с ESXi 6.0 и попытки ее запуска получил ошибку:
The operation on the file failed (14(Bad address))

Места в датасторе предостаточно.

Спасает команда vmkfstools -i "/vmfs/volumes/datastorename/vm/source.vmdk" -d thin "/vmfs/volumes/datastorename/vm/target.vmdk"

https://communities.vmware.com/thread/560785

Manage LSI RAID controller, installed on server running ESXi, in Windows

For example, we want to monitor MEGARAID SAS 9341-4I:

LSI Software:
https://www.broadcom.com/products/storage/raid-controllers/megaraid-sas-9341-4i#downloads

On ESXi:
– Download VMware Driver – usually from VMware site
– Download SMIS Provider
– Enter Maintenance Mode
– Set Host Image Profile Acceptance Level to Community in Security configuration.
– Install driver: esxcli software vib install -v /vmfs/volumes/VOLUME-NAME/DRV-DIR-NAME/DRV-NAME.vib –no-sig-check
– Reboot.
– Install SIMS Provider: esxcli software vib install -v /vmfs/volumes/VOLUME-NAME/DRV-DIR-NAME/SIMS-NAME.vib –no-sig-check
– Reboot.
– Check everything installed fine: esxcli software vib list | grep -i lsi
– Check LSI RAID appeared Health Status in vSphere Client or Web Client.
– Exit Maintenance Mode.
– Check CIM Server started in Security Profile. Also check its startup policy.
– Check CIM Server port.
– Check or set host name in DNS And Routing.

On Windows:
– Download and install Latest MegaRAID Storage Manager (MSM)
– Configure ESXi server’s A record in DNS or write it to hosts file.
– Start MSM and set “Display all the ESXi-CIMOM…” in Configure Host.
– Enter ESXi server’s IP and start discovery.

Troubleshooting:
– ping ESXi host to be sure it is available in network
– download SLP Helper utility and set ESXi host’s IP in slp_helper.php

HOWTOs:
https://habrahabr.ru/company/simnetworks/blog/241605/
https://pyatilistnik.org/kak-ustanovit-megaraid-smis-providers-na-vmware-esxi-5-5/
https://bogachev.biz/2015/09/08/Установка-MegaRAID-SMIS-Providers-на-VMware-ESXi-5-5/
https://serenity-networks.com/how-to-install-lsi-megaraid-storage-manager-msm-on-vmware-esxi-5-5/

Troubleshooting:
“Unable to connect to CIMOM server” in MSM