Remove all store apps windows 10


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.

Get-AppxPackage | Remove-AppxPackage

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.

Get-AppXProvisionedPackage -Online | Remove-AppxProvisionedPackage -Online

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:

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

  # 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/
  user = vmail
  unix_listener quota-warning {
        user = vmail
        mode = 0600

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

2. Create the alerting script:

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.

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:

openssl pkcs12 -in testuser1.pfx -nokeys | openssl x509 -noout -enddate

To specify password in plain text, add -passin pass:”${pass}”

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

openssl pkcs12 -clcerts -nokeys -in myContainer.p12 -out usercert.pem
openssl pkcs12 -nocerts  -in myContainer.p12 -out userkey.pem

3. Connect to HTTPS server with client certificate:

openssl s_client -connect -cert usercert.pem -key userkey.pem

Centos 7 systemctl tips and tricks

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

systemctl list-unit-files

2. Enable HTTPD + Mysql service on system boot:

systemctl enable httpd
systemctl enable mariadb

3. Reverting to iptables from firewalld

systemctl stop firewalld
systemctl mask firewalld

yum install iptables-services

systemctl enable iptables
systemctl start iptables

# to save iptables rules use
service iptables save

Online resize LVM partitions – shrink home / extend root

By default, most Linux Installers create separate /home partition, occupying most of the drive space.
When server is used mostly for system services, you may transfer free space from /home partition to /root.

Before adjustment we have 98% filled root partition and 141GB free space on /home, which we would like to use:

[root@oracle ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
                       50G   1G   50G  98% /
tmpfs                 630M     0  630M   0% /dev/shm
/dev/cciss/c0d0p1     477M  106M  346M  24% /boot
                      149G   60M  141G   1% /home

1. First step is to unmount /home partition

umount /home

System may refuse to unmount /home if you have users logged on to the box or services running from /home. After logging off / stopping services command should succeed.

2. Shrink old /home partition to 20GB, (system will force you to check filesystem for errors by running e2fsck)

e2fsck -f /dev/mapper/vg_oracle-lv_home
resize2fs /dev/mapper/vg_oracle-lv_home 20G

3. Reduce the LVM to 20G

lvreduce -L 20G /dev/mapper/vg_oracle-lv_home

4. Extend /root LVM to new size, utilizing 100% of free space on disk

lvextend -l +100%FREE /dev/mapper/vg_oracle-lv_root

5. Grow /root (ext3/4) partition to new LVM size

resize2fs /dev/mapper/vg_oracle-lv_root

6. Mount /home

mount /home


[root@oracle ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
                      178G   50G  128G  28% /
tmpfs                 630M     0  630M   0% /dev/shm
/dev/cciss/c0d0p1     477M  106M  346M  24% /boot
                       20G   45M   19G   1% /home

After these simple steps we have 72% of free disk space of root partition.


Resizing /home partition (/dev/mapper/vg_oracle-lv_home) to 20GB and transfering remaining space to /root (/dev/mapper/vg_oracle-lv_root):

umount /home
e2fsck -f /dev/mapper/vg_oracle-lv_home
resize2fs /dev/mapper/vg_oracle-lv_home 20G
lvreduce -L 20G /dev/mapper/vg_oracle-lv_home
lvextend -l +100%FREE /dev/mapper/vg_oracle-lv_root
resize2fs /dev/mapper/vg_oracle-lv_root
mount /home