Monday, June 24, 2013

Quick Script: Is UAC enabled?


    #UAC check
    $UAC = Get-ItemProperty -Path registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system -Name EnableLUA
    if($UAC.EnableLUA -eq 0){
        "[X] UAC - User Access Control disabled"
    }else{
        "[ ] UAC - User Access Control disabled : run Set-ServerSettings"
    } 

Monday, June 17, 2013

Quick Script: Is timezone correct?


#check timezone
    if( (tzutil /g) -match "Central Standard Time"){
        "[X] Timezone"
    }else{
        "[ ] Timezone : Set-ServerSettings"
    } 

Monday, June 10, 2013

Quick Script: Does server have a cert?


#Check for Cert
    if((get-item cert:\LocalMachine\My | get-childitem | ?{$_.Subject -imatch $fqdn}) -ne $null){
        Write-Host "[X] Certificate"
    } else {
        Write-Host "[ ] Certificate"
    } 

Tuesday, June 04, 2013

Quick Script: Is Windows Activated?


  #Chesk Activation status
    if((cscript "$env:SystemRoot\system32\slmgr.vbs" -dli all) -match "License Status: Licensed"){
      Write-Host "[X] Activated Windows" 
    }else{
      Write-Host "[ ] Activated Windows"
    }