Шукати в цьому блозі

четвер, 13 жовтня 2022 р.

В статті Налаштування OpenVPN-сервера на Mikrotik було наведено скрипт, який оновлює інформацію щодо публічних ntp-серверів, з яких Mikrotik може брати інформацію про точний час. Але справа в тому, що то для RouterOS гілки 6.x, а от для 7.x його доведеться трохи переписати:

/system script
add dont-require-permissions=no name=NTPupdate owner=olden policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source=":global SYSname [/system identity get name];\r\
    \n\r\
    \n# NTP pools to use (check www.pool.ntp.org)\r\
    \n:global SYSntpa \"0.ua.pool.ntp.org\";\r\
    \n:global SYSntpb \"1.ua.pool.ntp.org\";\r\
    \n\r\
    \nping \$SYSntpa count=2 do-not-fragment;\r\
    \nping \$SYSntpb count=2 do-not-fragment;\r\
    \n\r\
    \n# Resolve the two ntp pool hostnames\r\
    \n:local ntpipa [:resolve \$SYSntpa];\r\
    \n:local ntpipb [:resolve \$SYSntpb];\r\
    \n\r\
    \n# Get the current settings\r\
    \n:local ntpcura [/system/ntp/client/servers/get 0];\r\
    \n:local ntpcurb [/system/ntp/client/servers/get 1];\r\
    \n\r\
    \n# Define a variable so we know if anything's changed.\r\
    \n:local changea 0;\r\
    \n:local changeb 0;\r\
    \n\r\
    \n# Change primary if required\r\
    \n:if (\$ntpipa != \$ntpcura) do={\r\
    \n    :put (\"Old: \" . \$ntpcura . \" New: \" . \$ntpipa);\r\
    \n    :put \"Changing primary NTP\";\r\
    \n    /system/ntp/client/servers/set 0 address=\"\$ntpipa\";\r\
    \n    :set changea 1;\r\
    \n    }\r\
    \n\r\
    \n# Change secondary if required\r\
    \n:if (\$ntpipb != \$ntpcurb) do={\r\
    \n    :put (\"Old: \" . \$ntpcurb . \" New: \" . \$ntpipb);\r\
    \n    :put \"Changing secondary NTP\";\r\
    \n    /system/ntp/client/servers/set 1 address=\"\$ntpipb\";\r\
    \n    :set changeb 1;\r\
    \n    }\r\
    \n\r\
    \n:if (\$changea=1 or \$changeb=1) do={\r\
    \n    /system ntp client set enabled=\"no\"\r\
    \n    /ip dhcp-server network set [ find comment=\"dhcp-server\" ] ntp-server=\"192.168.31.1,\$ntpipa,\$ntpipb\"\r\
    \n    /system ntp client set enabled=\"yes\"\r\
    \n    }\r\
    \n"
Ну й не забуваємо його періодично викликати, для актуалізації інформації по ip-адресах ntp-серверів:
/system scheduler
add comment="Check and set NTP servers" interval=12h name=NTPupdate on-event="/system script run NTPupdate\r\
    \n" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/1970 start-time=00:00:00

четвер, 6 жовтня 2022 р.

winget

 Настільки наскільки я не люблю Windows, настільки сьогодні був вражений інструментом winget - сподобалося ;)

Знадобилося швиденько, на нову систему проінстальованого Windwos 10, встановити Google Chrome, PuTTY, WinSCP та деякі інші додатки. Що ж, це стало зручно робити, не витрачаючи час на пошуки ресурсів через Google, достатньо простого cmd.

Вводимо:

winget search putty

Бачимо id і далі просто:

winget install --id=PuTTY.PuTTY -e

Аналогічно

winget install --id=WinSCP.WinSCP -e
winget install --id=TeraTermProject.teraterm -e
winget install --id=Mozilla.Firefox -e
winget install --id=eloston.ungoogled-chromium -e
winget install --id=Google.Chrome -e --force
winget install --id=Microsoft.WindowsTerminal -e
winget install --id=Debian.Debian -e

Я у захваті. Сподобалося ;)

вівторок, 4 жовтня 2022 р.

Ways to install Windows 11

 This article describes ways to install Windows 11.

Note: To upgrade to Windows 11, devices should meet the Windows 11 minimum system requirements. Some Windows 10 features aren't available in Windows 11. System requirements to experience some Windows 11 features and apps will exceed the Windows 11 minimum system requirements. Find Windows 11 specs, features, and computer requirements

Before you begin

Make sure the device you want to install Windows 11 on meets the minimum system requirements. If your device is currently running Windows 10, we recommend you verify the minimum system requirements using the PC Health Check app. We do not recommend installing Windows 11 on a device that doesn't meet requirements. For more info, see Installing Windows 11 on devices that don't meet minimum system requirements.

Windows Update in Settings (recommended)

If you’re upgrading from Windows 10, we recommend you wait until you're notified through Windows Update that the upgrade is ready for your device. To check if Windows 11 is ready for your device, select Start  > Settings  > Update & Security  > Windows Update  > Check for updates.

For known issues that might affect your device, you can also check the Windows release health hub.

Other ways to install Windows 11 (not recommended) 

Use the Installation Assistant to upgrade

We recommend you wait until your device has been offered the upgrade to Windows 11 before you use the Installation Assistant. When you're ready, you can find it on the Windows 11 software download page.

Create Windows 11 installation media

On the Windows 11 software download page, select Create tool now and follow the instructions to install Windows 11.

Warning: 

  • Microsoft recommends against installing Windows 11 on a device that does not meet the Windows 11 minimum system requirements. If you choose to install Windows 11 on a device that does not meet these requirements, and you acknowledge and understand the risks, you can create the following registry key values and bypass the check for TPM 2.0 (at least TPM 1.2 is required) and the CPU family and model.

  • Registry Key: HKEY_LOCAL_MACHINE\SYSTEM\Setup\MoSetup

  • Name: AllowUpgradesWithUnsupportedTPMOrCPU

  • Type: REG_DWORD

  • Value: 1

  • Note: Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

There are two installation paths available:

  1. Upgrade by launching Setup on the media while running Windows 10. You will have the option to: 

    a. Perform a Full Upgrade, which keeps personal files (including drivers), apps, and Windows Settings. This is the default experience and is the one that Installation Assistant uses.

    b. Keep Data Only will keep personal files (including drivers) only, not apps and not Windows Settings.
     
    c. Clean Install will install Windows 11 and keep nothing from the Windows 10 installation. For more info, see Give your PC a Fresh Start.

  2. Boot from media to launch Setup. This path is a clean install and will not retain previous files or settings. For more info, see Give your PC a Fresh Start.

    Important: You should verify that your device meets minimum system requirements before you choose to boot from media, because it will allow you to install Windows 11 if you have at least TPM 1.2 (instead of the minimum system requirement of TPM 2.0), and it will not verify that your processor is on the approved CPU list based on family and model of processor.

Create an image install

Use DISM or 3rd party tools to directly apply an existing Windows 11 image to the disk.
 

Important: An image install of Windows 11 will not check for the following requirements: TPM 2.0 (at least TPM 1.2 is required) and CPU family and model.

https://support.microsoft.com/en-us/windows/ways-to-install-windows-11-e0edbbfb-cfc5-4011-868b-2ce77ac7c70e