Skip to content

Instantly share code, notes, and snippets.

@DavoudTeimouri
DavoudTeimouri / HPEG10_SmartArray_LogicalDrive.ps1
Last active December 26, 2020 09:37
Create Logical Drive on HPE ProLiant G10
$Servers= "iLO IP1","iLO IP2"
$Credential=Get-Credential
ForEach ($Server in $Servers)
{
$SAConnection= Connect-HPESA -IP $Server -Credential $Credential -DisableCertificateAuthentication
$iLOConnection= Connect-HPEiLO -IP $Server -Credential $Credential -DisableCertificateAuthentication
Start-Sleep -s 60
$HostPower= Get-HPEiLoServerPower -Connection $iLOConnection
If ($HostPower.Power -eq "Off")
{
@chadmcox
chadmcox / findSneakyADServiceAccounts.ps1
Last active August 29, 2024 16:27
This powershell script will assist in finding accounts that would make great targets for Kerberoasting. This script will also assist in validating spn's defined on user objects.
#Requires -Module activedirectory
#Requires -version 4.0
<#PSScriptInfo
.VERSION 1.5
.GUID 31adb560-b189-4b0c-86a7-7862d8e78094
.AUTHOR [email protected]
https://blogs.technet.microsoft.com/chadcox/
https://github.com/chadmcox
@gregjhogan
gregjhogan / random-string-generator.ps1
Last active February 5, 2025 17:14
Generate random string in powershell
#lowercase letters/numbers only
-join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})
# all characters
-join ((33..126) | Get-Random -Count 32 | % {[char]$_})