Remove all store apps windows 10

windows_modern_apps_bloatware

If you don’t use new (modern / metro) style application in windows you can delete all of them with a single PowerShell command.
To open PowerShell: Right click on Windows logo -> Command Prompt (Administrator – type powershell and press Enter.

This command removes all store apps for currently logged in user.
[code]
Get-AppxPackage | Remove-AppxPackage
[/code]

To delete installation packages from disk and prevent installation for new users:
WARNING! This cannot be undone, you will lose ability to install new apps from Windows Store.
[code]
Get-AppXProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online
[/code]

ISPconfig / dovecot – send mailbox quota warning to users

To alert users, that are approaching theirs mailbox quota limit you can use built in Dovecot plugin quota_warning.

1. Edit the main Dovecot configuration file:
/etc/dovecot/dovecot.conf

[code]
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve=/var/vmail/%d/%n/.sieve

# Do not change existing plugins defined above, just add new entries below

quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
quota_warning3 = -storage=100%% quota-warning below %u # user is no longer over quota
}

service quota-warning {
executable = script /usr/local/bin/quota-warning.sh
user = vmail
unix_listener quota-warning {
user = vmail
mode = 0600
}
}
[/code]

This will execute defined script /usr/local/bin/quota-warning.sh when user will exceed 80 and 95% of their mailbox space.

2. Create the alerting script:

[code]

#!/bin/sh
PERCENT=$1
USER=$2
cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o "plugin/quota=maildir:User quota:noenforcing" From: postmaster@localhost.local Subject: Mailbox size warning Your mailbox is now $PERCENT% full. Please delete old messages. EOF

[/code]
You may edit the text to better explain required steps to resolve this issue.

OpenSSL check p12 expiration date

1. Check .p12 / .pfx certificate expiration date:

[code]
openssl pkcs12 -in testuser1.pfx -nokeys | openssl x509 -noout -enddate
[/code]
To specify password in plain text, add -passin pass:”${pass}”

2. Export key and cert from .p12 / .pfx:

[code]
openssl pkcs12 -clcerts -nokeys -in myContainer.p12 -out usercert.pem
openssl pkcs12 -nocerts -in myContainer.p12 -out userkey.pem
[/code]

3. Connect to HTTPS server with client certificate:

[code]
openssl s_client -connect gmail.com:443 -cert usercert.pem -key userkey.pem
[/code]

Centos 7 systemctl tips and tricks

1. List all services enabled/disabled on boot (ex chkconfig –list)

[code]systemctl list-unit-files[/code]

2. Enable HTTPD + Mysql service on system boot:

[code]
systemctl enable httpd
systemctl enable mariadb
[/code]

3. Reverting to iptables from firewalld

[code]
systemctl stop firewalld
systemctl mask firewalld

yum install iptables-services

systemctl enable iptables
systemctl start iptables

# to save iptables rules use
service iptables save

[/code]