Check if a certain UNC path exists on all active AD Servers


Formatting looks very bad, but this word-press doesn’t let me formatted as I like.

$pcs = get-adcomputer -filter {operatingsystem -like "*server*"} 
$result = @()
foreach ($pc in $pcs) {
    if (test-connection -cn $pc.Name -count 1 -Quiet) {
        $path1 = ("\\{0}\c$\windows\\framework\v3.5" -f $ 
        $result = test-path -path $path1 
        $isVirtual = ((Get-WmiObject Win32_BIOS -ComputerName $ -match "VMware")
        New-Object PSObject -Property @{
            Computer = $;
            Path = $path1;
            Virtual = $isVirtual;
            Result = $result
$result | export-csv c:\TemporaryFolder\results.csv


Gather HP Out of band management card

Few months ago I’ve been asked to document all the out of band management cards from one of the new clients.  Without knowing the full architecture it was hard to find out which server had in iLO and which one didn’t.

I’ve managed to find out which server had an iLO by using the Win32_PnPEntity WMI class. The Win32_PnPEntity WMI class represents the properties of a Plug and Play device. Plug and Play entities are shown as entries in the Device Manager located in Control Panel (

By Using the query gwmi Win32_PnPEntity | Select Caption | where { $_.Caption -like “*ilo*” }  you can easily find out all iLOs. Of course, you will need to query the AD for the full list of servers and use a foreach.