View ExportEmailToPDF.gs
function exportEmailToPDF() { | |
// Script Variables to Set | |
var drivePath = DriveApp.getFolderById("LongStringOfTheDestinationFolderIdentifier"); | |
var plaintextPath = DriveApp.getFolderById("LongStringOfTheIntermediateFolderIdentifier"); | |
var label = GmailApp.getUserLabelByName("YourLabelNameGoesHere"); | |
// End of Script Variables to Set | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
//Logger.log(label.getName()); // Write to log the name of the label (can help identify label typos) | |
var threads = label.getThreads(); |
View certbot-multi-superdomain.sh
#!/bin/bash | |
certbot certonly --manual --manual-public-ip-logging-ok -d superdomain.net -d www.superdomain.net | |
read -n1 -r -s -p "Press any key to load certificate...`echo $'\r\n\r\n'`" | |
more /etc/letsencrypt/live/superdomain.net/cert.pem | |
read -n1 -r -s -p "Press any key to load private key...`echo $'\r\n\r\n'`" | |
more /etc/letsencrypt/live/superdomain.net/privkey.pem | |
read -n1 -r -s -p "Press any key to begin renewal process for superdomain.com...`echo $'\r\n\r\n'`" | |
certbot certonly --manual --manual-public-ip-logging-ok -d superdomain.com -d www.superdomain.com | |
read -n1 -r -s -p "Press any key to load certificate...`echo $'\r\n\r\n'`" | |
more /etc/letsencrypt/live/superdomain.com/cert.pem |
View certbot-superdomain.sh
#!/bin/bash | |
certbot certonly --manual --manual-public-ip-logging-ok -d superdomain.net -d www.superdomain.net | |
read -n1 -r -s -p "Press any key to load certificate...`echo $'\r\n\r\n'`" | |
more /etc/letsencrypt/live/superdomain.net/cert.pem | |
read -n1 -r -s -p "Press any key to load private key...`echo $'\r\n\r\n'`" | |
more /etc/letsencrypt/live/superdomain.net/privkey.pem | |
read -n1 -r -s -p "Press any key to end certificate renewal process...`echo $'\r\n\r\n'`" |
View Certbot-Ubuntu-Quickstart.sh
# Update Ubuntu and obtain/install/update Certbot | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository universe | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
# Make a manual certificate request | |
sudo certbot certonly --manual -d superdomain.net |
View CSVDataWithEmbeddedFormulas.csv
Column A | Column B | Column C | Formula | |
---|---|---|---|---|
1 | 2 | 5 | =SUM(A2:C2) | |
5 | 3 | 10 | =A3*C3+B3 | |
2 | 2 | 4 | =COUNTIF(A:C,2) | |
0 | 0 | No | =IF(and(A5=0,B5=0,C5="Yes"),1,0) | |
0 | 0 | Yes | =IF(and(A6=0,B6=0,C6="Yes"),1,0) | |
1 | 0 | 1 | =IF(AND(A7=1,B7=0),"UPDATE",IF(AND(A7=0,B7=1),"CHECK","No Change")) | |
0 | 1 | 1 | =IF(AND(A8=1,B8=0),"UPDATE",IF(AND(A8=0,B8=1),"CHECK","No Change")) | |
0 | 0 | 0 | =IF(AND(A9=1,B9=0),"UPDATE",IF(AND(A9=0,B9=1),"CHECK","No Change")) |
View Certbot-ManualMode.sh
sudo certbot certonly --manual --manual-public-ip-logging-ok -d domainnamehere.com -d www.domainnamenere.com |
View Get-ADGroupsSortedByName.ps1
$groups = Get-ADGroup -Filter 'Name -like "PATTERNGOESHERE*"' | Select-Object Name, SamAccountName; | |
"There are "+ $groups.Count +" matching groups."; | |
$groupDetails = ForEach ($grp in $groups) { | |
New-Object PSObject -Property @{'Group Name'=$grp.Name;Count=(Get-ADGroupMember $grp.SamAccountName -Recursive).Count}; | |
} | |
$groupDetails | Sort-Object -Property Count -Descending | Select-Object 'Group Name', Count; |
View ExportMachinesByOU.ps1
Get-AdComputer -Filter * -Property * -SearchBase 'OU=PhysicalSpace,OU=LabMachines,OU=Computers,OU=Unit,DC=fabrikam,DC=com' | Select-Object Name, IPv4Address | Export-CSV .\PhysicalSpace-ADComputers.csv -NoTypeInformation -Encoding UTF8 |
View QueryMachines.ps1
Get-ADComputer -Filter 'Name -like "MNS*"' -Property * | Select-Object Name, Description, DistinguishedName, OperatingSystem, OperatingSystemVersion, @{n='LastLogonTimeStamp';e={[DateTime]::FromFileTime($_.LastLogonTimeStamp)}}, WhenCreated, IPv4Address | Export-CSV .\WorkstationsLikeMNS.csv -NoTypeInformation -Encoding UTF8 |