This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#enter ilo IP address here | |
$ilourl = "https://192.168.1.14" | |
$jsonpage = $ilourl + "/json/login_session" | |
#disable certificate check | |
add-type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Script to find AD, find the known registered Service Connection Point's, an list some information about them. | |
detects dns domain on the network you're on | |
tries to detect default domain from dns server | |
connects to AD, get information about AD RMS, Exchange (possible to add others!) | |
#> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$RPC =Get-Counter "\MSExchange RpcClientAccess\User Count" -computername "srv1" | |
$OWA =Get-Counter "\MSExchange OWA\Current Unique Users" -computername "srv1" | |
$POP = Get-Counter "\MSExchangePop3(1)\Connections Current" -ComputerName "srv1" | |
$IMAP = get-counter "\MSExchangeImap4(1)\Current Connections" -ComputerName "srv1" | |
$csa=New-Object PSObject -Property @{ | |
Server = srv1" | |
"rpc" = $RPC.CounterSamples[0].CookedValue | |
"owa" = $OWA.CounterSamples[0].CookedValue | |
"pop" = $POP.CounterSamples[0].CookedValue | |
"imap" = $IMAP.CounterSamples[0].CookedValue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get a list from ad with all windows server 2003 and 2003 r2 machines | |
$list= get-ADComputer -Filter {OperatingSystem -Like "Windows Server*2003*"} | |
#intantiate an empty array | |
$hashlist=@{} | |
$admin=get-credential | |
#connect to each computer, get the file, and select it's version | |
foreach($computer in $list){ | |
$answer = Get-WMIObject -Computer $computer.DNSHostName -credential $admin -Query "SELECT * FROM CIM_DataFile WHERE Drive ='C:' AND Path='\\windows\\system32\\' AND FileName='crypt32' AND Extension='dll'" | select Version | |
#create a hashlist | |
$hashlist[$computer]=$answer |
NewerOlder