CLI uninstall Powerchute Business Edition from Windows 2012 Core

Run the following command to deinstall PBE from the Command Line Interface

 

PowerChute Business Edition Agent:

“C:\Program Files (x86)\InstallShield Installation Information\{BCE9F441-9027-4911-82E0-5FB28057897D}\setup.exe” -runfromtemp -l0x0409 AnyText -removeonly

PowerChute Business Edition Server:

“C:\Program Files (x86)\InstallShield Installation Information\{A6491A4A-AAA0-4892-BFEF-ECD6CECE2FF3}\setup.exe” -runfromtemp -l0x0409 AnyText -removeonly

PowerChute Business Edition Console:

“C:\Program Files (x86)\InstallShield Installation Information\{0F86FD09-BA63-4E45-A70B-604C1106C2F2}\setup.exe” -runfromtemp -l0x0409 AnyText -removeonly

 

The corresponding directories in “C:\Program Files (x86)\InstallShield Installation Information” could also be removed

Getting the Directory Size on Remote Servers.

Use the following script:

 

$dataColl = @()#Makes an array, or a collection to hold all the object of the same fields.

foreach ($serverName in (get-content "c:\servers.txt"))

{
$path = "\\$serverName\f$\temp"
$dirSize = Get-ChildItem $path -recurse -force | select Length |Measure-Object -Sum -property length
$dirSize.sum = $dirSize.sum/1GB
$finalResult = "{0:N2} GB" -f $dirsize.sum
$dataObject = New-Object PSObject
Add-Member -inputObject $dataObject -memberType NoteProperty -name "ServerName" -value $serverName
Add-Member -inputObject $dataObject -memberType NoteProperty -name "Dir_Size" -value $finalResult
$dataColl += $dataObject
$dataObject
}

$dataColl | Out-GridView -Title "Remote Directory Scan Results"
$dataColl | Export-Csv -noTypeInformation -path "c:\temp.csv"

 

to workaround the error: Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

 

use the following script:

$dataColl = @()#Makes an array, or a collection to hold all the object of the same fields.

foreach ($serverName in (get-content "c:\servers.txt"))

{
$path = "\\$serverName\f$\data"
#$dirSize = Get-ChildItem $path -recurse -force | select Length |Measure-Object -Sum -property length
$dirSize = (robocopy.exe $path $env:Temp /zb /e /l /r:1 /w:1 /nfl /ndl /nc /fp /bytes /np /njh | ? {$_ -match "Bytes :"}).trim().split(" ")[2]
$dirsum = $dirSize/1GB
$finalResult = "{0:N2} GB" -f $dirsum
$dataObject = New-Object PSObject
Add-Member -inputObject $dataObject -memberType NoteProperty -name "ServerName" -value $serverName
Add-Member -inputObject $dataObject -memberType NoteProperty -name "Dir_Size" -value $finalResult
$dataColl += $dataObject
$dataObject
}

$dataColl | Out-GridView -Title "Remote Directory Scan Results"
$dataColl | Export-Csv -noTypeInformation -path "c:\temp.csv"

 

source: http://thescriptlad.com/2011/04/16/get-remote-dir-size/

Excel – Count colored cells

Copy and paste the following code into you VBA project (alt+f10 in excel)

 

Public Function cell_colour(Cell_Check As Range) As Long
cell_colour = Cell_Check.Interior.Color
End Function

Public Function count_colour(Count_Range As Range, Colour As Long) As Long
Dim x As Range
count_colour = 0
For Each x In Count_Range
If x.Interior.Color = Colour Then
count_colour = count_colour + 1
End If
Next x
End Function

 

With the formula “count_colour(B1:B10;cell_colour($A$1))” you can count the colorourd cells in B1 to B10 with the same colour as the cell in A1