Hodžův blog

Archive for the 'Windows' Category

25 Kvě

Howto: Remove Microsoft Office from your windows computer with PowerShell

Simple … Isn’t It?? Get-AppxPackage -name “Microsoft.Office.Desktop” | Remove-AppxPackage Get-AppxPackage *officehub* | Remove-AppxPackage

12 Kvě

HowTo: Import a PEM certificate and PEM private key into the Windows key store

Create a PKCS12 file containing the certificate and its private key: $ openssl pkcs12 -export -in MyCertficate.crt -inkey MyPrivateKey.pem -out CertificateForImportInWindows.p12 The .p12 generated file is protected by a password and can then be transported without any risk. On a Windows, open this .p12 file and follow the instructions provided.

30 Zář

How to find: Exchange Administration Center URL

In Exchange Management Shell run this command: Get-ECPVirtualDirectory | Format-List InternalURL,ExternalURL

08 Zář

Windows, PowerShell a nastavení vlastníka adresáře podle názvu složky

Když vám třeba někdo rozbijete oprávnění na domovských složkách uživatelů z Active Directory… Foreach ($Folder in Get-ChildItem „D:\data\home-students“) { $domain=”nazev.domeny” $Username=$Folder.Name $ID=new-object System.Security.Principal.NTAccount($domain, $username) $Path=“D:\data\home-students\$username“ write-host $path $acl=get-acl $path $acl.SetOwner($ID) set-acl -path $path -aclObject $acl }

25 Srp

PowerShell – Start All Exchange Services

Get-Service *Exchange* | Start-Service

09 Kvě

Create desktop shortcut to windows update (Windows 10/Windows Server 2019)

1. Right-click an empty area on the desktop and select New > Shortcut 2. In the Location field, enter the following URI and click Next ms-settings:windowsupdate 3. In the next field type in a shortcut name (Windows Update) and click Finish

30 Dub

HowTo: Uninstalling Windows Defender with PowerShell

Uninstall-WindowsFeature -Name Windows-Defender

21 Zář

Sync time on Windows 2019 server

# Set NTP servers w32TM /config /syncfromflags:manual /manualpeerlist:pool.ntp.org /update # Restart the time service net stop w32time && net start w32time # Resync the time w32tm /resync # Verify status w32tm /query /status

21 Zář

Failed to establish secure connection: sslv3 alert handshake failure: 1040

Debian 10 (Buster) + latest NSClient++ on Windows 2019 server Linux: root@nagios:/# /usr/lib/nagios/plugins/check_nrpe -H -c check_ad CHECK_NRPE: (ssl_err != 5) Error – Could not complete SSL handshake with 1 Windows: 2019-09-21 18:30:46: error:c:\source\master\include\socket/connection.hpp:273: Seems we other end is not using ssl: unknown protocol 2019-09-21 18:30:46: error:c:\source\master\include\socket/connection.hpp:274: Please review the ssl option as well […]

18 Zář

Convert Windows Server 2019 Eval to Server Standard

DISM /online /Get-CurrentEdition DISM /online /Get-TargetEditions DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEULA slmgr.vbs /upk slmgr.vbs /ipk your_mak_key slmgr.vbs /ato Official KMS client keys https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys

Hodžův blog is is proudly powered by Wordpress and the Magellan Theme