• Home
  • Cisco
  • Exchange
  • Linux
  • Navision
  • Network
  • Virtualization
  • Windows
  • About
  •  

    Powershell script cannot be loaded because the execution of scripts is disabled on this system

    August 22nd, 2014

    Enable running scripts:
    set-ExecutionPolicy Unrestricted


    Show Exchange version in powershell

    August 14th, 2014

    GCM exsetup |%{$_.Fileversioninfo}

    Exchange versions. Service packs and updates


    Enable snmp on ESX5 host

    August 13th, 2014

    Enable SSH access on ESX host
    Install vmware vSphere CLI

    Go to:
    C:\Program Files (x86)\VMware\VMware vSphere CLI\bin

    See configuration with:
    vicfg-snmp.pl –server 10.0.0.42 -s

    Setup snmp:
    vicfg-snmp.pl –server 10.0.0.42 -c info -p 161 -t 10.0.0.10@161/public,10.0.0.17@161/public
    CIM:
    vicfg-snmp -server 10.0.0.42 -y indications

    IPMI:
    vicfg-snmp -server 10.0.0.42 -y sensors

    10.0.0.42 — esx host
    161 – port (udp)
    10.0.0.10/10.0.0.17 target (HP SIM etc.)
    info – my community string

    Enable snmp
    vicfg-snmp.pl –server 10.0.0.42 -E

    Se configuration agin.
    vicfg-snmp.pl –server 10.0.0.42 -s

    test with snmpwalk:
    SnmpWalk.exe -r:10.0.0.42 -c:info

    Update:
    On a ESXi5.1 and newer, use esxcfg-snmp.pl isted of vicfg-snmp.pl


    Remove specific recipient email from postfix queue

    August 1st, 2014

    postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } / refund_of_tax@mycomp\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –

    Script:

    #Bash
    while true; do
    sleep 5
    postqueue -p | tail -n +2 | awk ‘BEGIN { RS = “” } / refund_of_tax@mycomp\.com/ { print $1 }’ | tr -d ‘*!’ | postsuper -d –
    done

    Block the email:

    nano /etc/postfix/recipient_access
    [email protected] REJECT

    postmap /etc/postfix/recipient_access
    /etc/init.d/MailScanner restart