воскресенье, 14 июня 2020 г.

Публикация Exchange Web Services через pfSense с HAProxy

Исходные данные:
corpmail.company.ru как имя Exchange-сервера во внутреннем и внешнем DNS.
Извне corpmail.company.ru (A) = 46.46.46.46
Внутри corpmail.company.ru (A) = 10.65.10.65
Адрес на внешнем интерфейсе pfSense = 46.46.46.46
Порт 443 не задействован извне другими службами. 
У нас есть внешний сертификат, содержащий corpmail.company.ru в subject alternative name. Либо используем Lets Encrypt с пакетом acme.
У нас есть установленный пакет HAProxy.

понедельник, 20 апреля 2020 г.

How to open lagre pst file in MS Outlook (up to 90Gb)

Добавить руками в реестр:
HKEY_CURRENT_USER\Software\Microsoft\Office\%outlook.verison%\Outlook\PST
REG-DWORD (32 bit)
hex-формат
WarnFileSize = 81920
WarnLargeFileSize = 81920
MaxFileSize = 92160
MaxLargeFileSize = 92160

суббота, 4 апреля 2020 г.

среда, 11 марта 2020 г.

powershell, merge 2 text files


$file2 = Get-Content "C:\app\src\bad_daily.txt"
Add-Content "C:\app\_txt\bad_regular.txt" "`r"
Add-Content "C:\app\_txt\bad_regular.txt" $file2
del "C:\app\src\bad_daily.txt"

источник
источник

суббота, 29 февраля 2020 г.

Очистка временных файлов, powershell

Когда сроки выполнения задачи 3-5 минут.

Remove-Item "$env:USERPROFILE\appdata\roaming\1C\Файлы\УправлениеТорговлей\*" -force -recurse
Remove-Item "$env:USERPROFILE\appdata\local\1C\1cv8\*" -force -recurse
Remove-Item "$env:temp\*" -force -recurse

среда, 19 февраля 2020 г.

Kaspersky Endpoint. Kavremover. Local users and groups = error loading type library dll

Использование kavremover актуальной версии приводит к тому, что локальные пользователи и группы более невозможно открыть через mmc.

Что помогло:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}]

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0]

@="Active DS Type Library"

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\0]

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\0\win32]

@="C:\\WINDOWS\\System32\\activeds.tlb"

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\FLAGS]

@="0"

[HKEY_CLASSES_ROOT\TypeLib\{97d25db0-0363-11cf-abc4-02608c9e7553}\1.0\HELPDIR]

@="C:\\WINDOWS\\System32"

Спасибо:
http://forum.oszone.net/thread-134442.html
https://forum.kasperskyclub.ru/index.php?showtopic=64552
https://community.kaspersky.com/produkty-kaspersky-dlya-biznesa-31/ne-udalyaetsya-kes-11-shtatnym-instrumentom-posle-ispolzovaniya-kavremvr-ne-dostupna-osnastka-local-user-and-groups-6821

суббота, 15 февраля 2020 г.

IPsec between pfSense and Kerio Control

Kerio Control side:
Passive.
Type:IPsec.
Preshared key: pfsense random key.
Local ID: Kerio Control external IP address.
Remote ID: pfSense external IP address.
Phase 1: 3des-sha1-modp1536 - change to more stronger and repeat with pfSense.
Phase 2: aes128-sha1 - change to more stronger and repeat with pfSense.
Remote networks: pfSense local networks.
Local networks: Kerio Control local networks.
Confirure traffic policy.

pfSense side:
Phase1:
Key Exchange version: IKEv1.
Internet Protocol: IPv4.
Interface: WAN.
Remote Gateway: Kerio Connect external IP address.
Authentication Method: Mutural PSK.
Negotiation mode: Main.
My identifier: My IP address.
Peer identifier: My IP address.
Pre-Shared Key: generate random Key.
Encryption Algoritm: 3DES - SHA1 - 5(1536 bit) - select more stronger, like in Kerio Control.
Lifetime (Seconds): 10800.
Disable rekey:No.
Margintime: Empty.
Responder Only: empty (if Kerio will active, select this checkbox).
NAT Traversal: Auto.
Dead Peer Detection: No.
Phase2:
Mode: Tunnel IPv4.
Local Network: Address/Subnet за pfSense.
NAT/BINAT translation: None.
Remote Network: Network/Address за Kerio Control.
Protocol: ESP
Encryption Algoritms: AES128 - SHA1 - select more stronger, like in Kerio Control.
PFSkey group: Off.
Lifetime: 3600.
Automatically ping host: IP address behind Kerio, if needed.
Status - IPsec - Connect.
Configure NAT (if manual) and firewall (if needed).

четверг, 3 октября 2019 г.

Windows 10 set logon/lockscreen background gpo

Положить backgroundDefault.jpg в  netlogon.


%policyname%\Computer configuration\Preferences\Windows Settings\Files


sourse:
\\domain.locall\NETLOGON\info\backgroundDefault.jpg
 dest:
%windir%\System32\oobe\info\backgrounds\backgroundDefault.jpg


Добавить:
Common -> Item-level Targeting -> OS = Windows7, 8, 10


%policyname%\Computer configuration\Preferences\Windows Settings\Registry


Добавить раздел PersonalizationCSP и 3 параметра внутрь
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP

LockScreenImagePath
(REG_SZ)
c:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg

LockScreenImageStatus
(REG_DWORD)
1

LockScreenImageUrl
(REG_SZ)
c:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg

Добавить:
Common -> Item-level Targeting -> OS = Windows10




Источник

пятница, 18 января 2019 г.

Adobe acrobat reader DC. msi, mst, gpo. Ver.19.10 (2019.010.20069)

Собрал актуальную, на текущую дату версию в msi.
Ссылка.
При развертывании через гп, добавить ardc.mst из корня как модификацию.

суббота, 5 января 2019 г.

MS SQL reset sa password / add access to new admin

Copy-paste:

Here is another workaround:

Run the SQL Server Management Studio as the system account. This can be done easily with the PsExec program. Download PsExec from Sysinternals website. Extract the PsExec.exe program and save it to a folder on your computer such as C:.
Open an elevated Command Prompt and run the following command:

C:\PsExec.exe -s -i "C:\Program Files (x86)\Microsoft SQL Server\110\Tool\Binn\ManagementStudio\Ssms.exe"

It will start SQL Server Management Studio as the system account. You’ll see that the username is shown as "NT AUTHORITY\SYSTEM". Simply choose the Windows Authentication mode and click on the Connect button.

Once you connect, you can reset SA password with ease.
If this also doesn't work, the last resort is try some third-party software such as SQL Server Password Changer, or reinstall your SQL Server.

источник