sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
#!/bin/bash | |
#If no argument is specified, ask for it and exit | |
if [[ -z "$@" ]]; | |
then | |
echo "An argument is needed to run this script"; | |
exit | |
else | |
arg="$@" | |
#Basic check to make sure argument number is valid. If not, display error and exit | |
if [[ $(($(echo $arg | grep -o "\s" | wc --chars) / 2 )) -ne 2 ]]; |
################################################################################################################# | |
# | |
# Password-Expiration-Notifications v20220823 | |
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64 | |
# | |
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27 | |
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/ | |
# https://github.com/titlerequired/public | |
# Robert Pearman (WSSMB MVP) | |
# TitleRequired.com |
### PowerShell template profile | |
### Version 1.03 - Tim Sneath <tim@sneath.org> | |
### From https://gist.github.com/timsneath/19867b12eee7fd5af2ba | |
### | |
### This file should be stored in $PROFILE.CurrentUserAllHosts | |
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following: | |
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force | |
### This will create the file and the containing subdirectory if it doesn't already | |
### | |
### As a reminder, to enable unsigned script execution of local scripts on client Windows, |
# ------------------------------------------------------------------------ | |
# NAME: DiscoverLastBootUpTime.ps1 | |
# AUTHOR: Andre @ http://blog.teksoporte.es | |
# DATE:06/16/2015 | |
# | |
# COMMENTS: This script creates gets the LastBootUpDate from the PC and | |
# stores it on $LBT. Compares it with the specified variable $timeSpan | |
# and if LastBootUpTime is Less or Equal to the $timeSpan the PC is | |
# considered NON-COMPLIANT. | |
# This script is backward compatible with PowerShell 2.0! |
########################################################################### | |
# | |
# NAME: RemediateRegImgPathVulnerability.ps1 | |
# | |
# AUTHOR: Teksoporte.es | |
# HOMEPAGE: http://blog.teksoporte.es | |
# | |
# COMMENT: This script will scan services ImgPath in the registry for | |
# unquoted paths. Same script can be used to remediate by just changing | |
# the variables below. |
########################################################################### | |
# | |
# NAME: DiscoverRegImgPathVulnerability.ps1 | |
# | |
# AUTHOR: Teksoporte.es | |
# HOMEPAGE: http://blog.teksoporte.es | |
# | |
# COMMENT: This script will scan services ImgPath in the registry for | |
# unquoted paths. Same script can be used to remediate by just changing | |
# the variables below. |
########################################################################### | |
# | |
# NAME: DisableNetBiosOverTcpIp.ps1 | |
# | |
# AUTHOR: aamaral | |
# | |
# COMMENT: This script will scan through all enabled NICs and disable Netbios Over TCP/IP | |
# | |
# VERSION HISTORY: | |
# 1.0 18/05/2015 - Initial release |
########################################################################### | |
# | |
# NAME: DiscoverNetBiosOverTcpIpSettings.ps1 | |
# | |
# AUTHOR: aamaral | |
# | |
# COMMENT: This script will scan through all the enabled NICs and discover | |
# it's current setting. (0=Enabled, 1=Enabled, 2=Disabled) | |
# | |
# VERSION HISTORY: |
<# | |
This script will disable automatic updates if it is enabled. | |
Name: Remediate_JavaAutoupdateIsOn.ps1 | |
Created: 16.05.2015 | |
Version: 1.0 | |
Author: Teksoporte.es | |
Homepage: http://blog.teksoporte.es | |
#> |