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 | |
#Variables | |
FILENAME=/loc/to/file/$(date +%Y%m%d).sql | |
FILENAMEREMOTE=/loc/to/file/$(date +%Y%m%d).sql | |
FTPHOSTNAME="ip and port" | |
FTPUSERNAME="" | |
FTPPASSWORD="" | |
SQLUSERNAME="" | |
SQLPASSWORD="" |
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 | |
#Variables | |
FILELOC= /file/loc/ | |
ARCHIVENAME=/file/loc/$(date +%Y%m%d).zip | |
FILENAMEREMOTE=/file/loc/$(date +%Y%m%d).zip | |
FTPHOSTNAME="ip and port" | |
FTPUSERNAME="" | |
FTPPASSWORD="" |
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
# Function Find users OU | |
function getADGroup { param([string]$adfindtype, [string]$cName) | |
# Create A New ADSI Call | |
$root = [ADSI]'' | |
# Create a New DirectorySearcher Object | |
$searcher = new-object System.DirectoryServices.DirectorySearcher($root) | |
# Set the filter to search for a specific CNAME | |
$searcher.filter = "(&(objectClass=$adfindtype) (sAMAccountName=$cName))" | |
# Set results in $adfind variable | |
$adfind = $searcher.findall() |