miércoles, 1 de octubre de 2014

Crear Aplicación en IIS6 con Powershell

Crear Aplicación en IIS6 con Powershell.

Function CrearIISApp {
    Param ([Parameter(Mandatory=$False,Position=0)][string]$AppNom,
    [Parameter(Mandatory=$False,Position=0)][string]$AppPath,
    [Parameter(Mandatory=$False,Position=0)][string]$AppDefDoc,
    [Parameter(Mandatory=$False,Position=0)][string]$AppPoolNom,
    [Parameter(Mandatory=$False,Position=0)][string]$AppSite)
    $path = [ADSI]"IIS://localhost/$AppSite/ROOT"
    $app = $path.Create("IIsWebVirtualDir", $AppNom)
    $app.AppCreate2(1)
    $app.Put("AppFriendlyName", $AppNom)
    $app.Put("Path", $AppPath)
    $app.Put("DefaultDoc", "$AppDefDoc")
    $app.Put("AppPoolId", "$AppPoolNom")
    $app.SetInfo()
    }



martes, 13 de mayo de 2014

No funcionan los certificados GEOTrust con Firefox

Hay que agregar en Trusted Root Certificates el certificado internmedio de GEOTRUST

https://knowledge.geotrust.com/support/knowledge-base/index?page=content&actp=CROSSLINK&id=SO15687

viernes, 9 de mayo de 2014

Script Powershell para extraer Memoria de AppPools

Este script extrae de todos los AppPools: Memoria, tiempo en minutos que se ejecuta, Memoria, threads, Tamaño en PF y Page Faults.

$Resultat = Get-WmiObject -Query "Select * from Win32_Process where name = 'w3wp.exe'"

    $AppPool =  @{Name='ApplicationPool';Expression={($_.commandline).split(' ')[-1]}}
    $Process = @{Name='Process';Expression={$_.name}}
    $RunningSince = @{Name='Runningsince';Expression={[System.Management.ManagementDateTimeconverter]::ToDateTime($_.creationdate)}}
    $Memory = @{Name='MemoryUsed';Expression={'{0:#,#}' -f $_.WorkingSetSize}}
    $Threads = @{Name='ThreadCount';Expression={$_.threadcount}}
    $PageFile = @{Name='PageFileSize';Expression={'{0:#,#}' -f $_.pagefileusage}}
    $PageFaults = @{Name='PageFaults';Expression={'{0:#,#}' -f $_.pagefaults}}   

$data = $Resultat | Select-Object $AppPool, $Process, $RunningSince, $Memory, $Threads, $PageFile, $PageFaults

foreach ($ApplicatioPool in $data){
$AppNOM = $ApplicatioPool.ApplicationPool
$AppPID = $ApplicatioPool.Process
$AppRS = $ApplicatioPool.Runningsince
$AppMEM = $ApplicatioPool.MemoryUsed.Replace(".","")
$Appthr = $ApplicatioPool.ThreadCount
$AppPFi = $ApplicatioPool.PageFileSize.Replace(".","")
$AppPF = $ApplicatioPool.PageFaults.Replace(".","")
[datetime]$RunningSize = "$AppRS"
$span = [datetime]::Now - $AppRS
$RunT = New-Object DateTime -ArgumentList $Span.Ticks
$span = $span.minutes
Write-Host "$AppNOM;$span;$AppMEM;$Appthr;$AppPFi;$AppPF"
}