Opslag
Count and compare two folders with PowerShell and mail the result
- Hent link
- X
- Andre apps
Remove all phone numbers on all users in OU in Windows domain
- Hent link
- X
- Andre apps
Find all Exchange mailboxes a list of users have access to with PowerShell
- Hent link
- X
- Andre apps
To find all Exchange mailboxes a list of users have access to put the mailboxes in a TXT file. One mailbox per line, e.g.: myname@domain.com mynewname@domain.com etc. Save the file as 'users.txt' and put the file on your desktop. Run this code to create a TXT file with all the mailboxes a user has access to:
Installing Ansible on Ubuntu 18.04 and running simple commands
- Hent link
- X
- Andre apps
INSTALL: sudo apt update sudo apt install software-properties-common sudo apt-add-repository ppa:ansible/ansible sudo apt update sudo apt install ansible CONFIGURE: *Edit '/etc/ansible/hosts' *Define 'hosts' - or Ansible clients. Create a group called 'ahosts': [ahosts] host1 ansible_ssh_host=192.168.1.28 *Tell Ansible to use python interpreter in path /usr/bin/python3 (shipped with Ubuntu 18.04) [servers:vars] ansible_python_interpreter=/usr/bin/python3 *Tell Ansible to use username 'ak' when connecting to hosts (if not using SSH keys): *Make dir '/etc/ansible/group_vars' *Edit '/etc/ansible/group_vars/servers' --- ansible_ssh_user: ak RUN COMMAND ON HOSTS IN GROUP 'ahosts' AND ASK FOR SSH PASSWORD: ansible --ask-pass -m ping ahosts RUN COMMAND ON HOSTS 'host1' AND 'host2' AND ASK FOR SSH PASSWORD: ansible --ask-pass -m ping host1:host2 RUN SHELL COMMAND ON HOSTS IN ...
Data leak prevention for Danish social security numbers (regular expression)
- Hent link
- X
- Andre apps
I've created a regular expression to prevent leaking Danish social security numbers via e-mails. I use this filter in my SPAM filter/SMTP (outgoing and incoming) server (SpamTitan) and it will match both 123456-7890 and 1234567890: (\W|^)[0-9][0-9][0-9][0-9][0-9][0-9](-| |)[0-9][0-9][0-9][0-9](\W|$)