Skip to content

Instantly share code, notes, and snippets.

View norman-bauer's full-sized avatar

Norman Bauer norman-bauer

View GitHub Profile
@starcraft66
starcraft66 / le-hpilo.sh
Last active July 8, 2024 06:42
Automatically deploy TLS certificates to HP iLO4 management controllers using the dehydrated ACME client.
#!/bin/bash
fqdn=ilo.example.com
username=Administrator
password=Password
#Check if the certificate is expiring soon
echo | openssl s_client -servername $fqdn -connect $fqdn:443 2>/dev/null | openssl x509 -noout -checkend 2592000
if [ "$?" == "1" ]; then
#Expiring in less than one month. We need to renew
@dkittell
dkittell / Get-NTPDateTime.ps1
Created December 3, 2015 18:21
PowerShell - Get/Set Windows Date/Time from NTP
<#
Majority of code is from:
Chris Warwick, @cjwarwickps, August 2012
chrisjwarwick.wordpress.com
#>
$sNTPServer = 'pool.ntp.org'
function Get-NTPDateTime ([string] $sNTPServer)
{