Rexxer

Some tips for me and other

Windows

Direct Access + There is no valid certificate to be used by IPsec which chains to the root/intermediate certificate configured to be used by IPsec in the DirectAccess configurationDirect Access

We’ve got an error like: There is no valid certificate to be used by IPsec which chains to the root/intermediate certificate configured to be used by IPsec in the DirectAccess configuration and in the Dashboard it shows red IPSEC. We updated the template and re-issued the certificate but the error was still. The fix: we […]

Windows + Move the Recovery partition

Warning 1: You must know what the following commands do before you execute them. Check the link above and MS’s documentation for diskpart, dism and reagentc. Warning 2: Check disk numbers, partition numbers and volume letters carefully before executing commands.

Renew the certificate for Azure Proxy Connector

Update root certificates

certutil.exe -generateSSTFromWU C:\PS\roots.sst $sstStore = ( Get-ChildItem -Path C:\ps\rootsupd\roots.sst )$sstStore | Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root link: https://woshub.com/updating-trusted-root-certificates-in-windows-10/#h2_1

WinSxS cleanup

Clean up: Dism.exe /online /cleanup-image /AnalyzeComponentStore Dism.exe /online /cleanup-image /StartComponentCleanup Health check and restore (if the commands above show errors): sfc /scannow Dism /Online /Cleanup-image /Scanhealth Dism /Online /Cleanup-Image /RestoreHealth

SSH-COPY-ID for Windows

type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {IP-ADDRESS-OR-FQDN} “cat >> .ssh/authorized_keys”

Port forward with Windows 10

netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=9000 connectaddress=192.168.0.10 connectport=80 netsh interface portproxy delete v4tov4 listenaddress=127.0.0.1 listenport=9000

ActiveMQ + Docker + network ports conflict

We got some errors like: When ActiveMQ started from the Docker container “Error starting userland proxy: Bind for 0.0.0.0:1883: unexpected Error response from daemon: failed to create endpoint SpinWay on network nat: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20). Solution: netsh int ipv4 […]

Powershell + string to array

An array is created with the -split operator. Like so, $myString=”Four score and seven years ago” $arr = $myString -split ‘ ‘ $arr # Print output Four score and seven years ago When you need a certain item, use array index to reach it. Mind that index starts from zero. Like so, $arr[2] # 3rd […]

Group policy + Account lockout audit

Found out the strange thing: my script for locked out accounts stopped working after 21 November 2018. I checked eventlog and didn’t see any 4740 events. After investigation I resolved it. It must be turned on there: Computer configuration/Policies/Windows Settings/Security settings/Advanced Audit Policy Configuration/Logon/Logoff/Audit Account Lockout Then I checked it: Auditpol /get /category:*

Previous Posts