This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADUser -Filter {(Enabled -eq "True") -and (PasswordNeverExpires -eq "True")} -Properties SamAccountName, PasswordNeverExpires | ft Name, SamAccountName, PasswordNeverExpires | |
Get-ADUser -Filter {(Enabled -eq "True") -and (PasswordNeverExpires -eq "False")} -Properties SamAccountName, PasswordLastSet | Where PasswordLastSet -le (Get-Date).AddDays(-30) | ft Name, SamAccountName, PasswordLastSet | |
Get-ADUser -Filter {(Enabled -eq "True") -and (PasswordNeverExpires -eq "False")} -Properties SamAccountName, LastLogon | Where-Object {([datetime]::FromFileTime($_.LastLogon) -le (Get-Date).AddDays(-90))} |ft Name, SamAccountName, {[datetime]::FromFileTime($_.LastLogon)} | |
Get-ADGroupMember 'domain admins' | select name,samaccountname | |
Get-ADGroupMember 'enterprise admins' | select name,samaccountname | |
Get-LocalGroupMember "admins local fhbf" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Release :2021-02-15 | |
# Description : Install owncloud on ubuntu 20.04 | |
# Version : 1.0 | |
############### | |
db_name="owncloud" | |
db_username="ownclouduser" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Package generated configuration file | |
# See the sshd_config(5) manpage for details | |
# What ports, IPs and protocols we listen for | |
Port 22 | |
# Use these options to restrict which interfaces/protocols sshd will bind to | |
#ListenAddress :: | |
#ListenAddress 0.0.0.0 | |
Protocol 2 | |
# HostKeys for protocol version 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Release : 2019-01-06 | |
# Description : InstaPy Backup | |
# Version : 1.1 | |
############### | |
if [ ! -d /root/backup ]; then | |
mkdir -p /root/backup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Release : 2018-12-04 | |
# Description : File Download then Upload to Dropbox | |
# Version : 1.2 | |
############### | |
path_to_upload() { | |
default_up_path="/Education" | |
read -p $"Enter Path to upload (Enter to default): " up_path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Release : 2018-10-24 | |
# Update : 2018-12-22 | |
# Description : WireGuard Automation - Server Side | |
# Version : 1.3 | |
############### | |
### Color's ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Release : 2018-04-07 | |
# Description : Git auto update for repository | |
# Version : 1.2 | |
############### | |
### Colors #### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Release : 2018-06-24 | |
# Description : IKEV2 Auto Creator | |
# Version : 1.1 | |
############### | |
### Colors #### | |
BRed="\033[1;31m" | |
BGreen="\033[1;32m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Author ### | |
# By : Mehran Goudarzi | |
# Update : 2018-11-12 | |
# Description : Automation Installer (Ubuntu 18.0 & Ubuntu 16.0) | |
# Version : 1.2 | |
############### | |
echo -e "[*] General dependencies..." | |
apt-get update | |
apt-get -y upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Automation resize remaining diskspace for Kali Linux 2018.2 on Rapsberry Pi3 | |
# Get the starting offset of the root partition | |
PART_START=$(parted /dev/mmcblk0 -ms unit s p | grep "^2" | cut -f 2 -d:) | |
[ "$PART_START" ] || return 1 | |
# Return value will likely be error for fdisk as it fails to reload the | |
# partition table because the root fs is mounted | |
fdisk -uc /dev/mmcblk0 <<EOF |
NewerOlder