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 | |
# Takes Let's Encrypt SSL certificates and generates a script to paste in to your NetApp CLI to automatically install the certificate. | |
# Paths assume you use acme.sh, adjust variables at top of file as needed. | |
VSERVER="NTPCLST02" | |
CERT_CN="ntpclst02.ttl.one" | |
CERT_CER="/root/.acme.sh/$CERT_CN/$CERT_CN.cer" | |
CERT_KEY="/root/.acme.sh/$CERT_CN/$CERT_CN.key" | |
CERT_INTCA="/root/.acme.sh/$CERT_CN/ca.cer" | |
CERT_ROOTCA="" | |
CERT_CA_CN=`cat $CERT_CER | openssl x509 -noout -text | grep "Issuer: " | awk -F'CN=' '{print $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
$links=' | |
' | |
$results=@(); foreach ($link in $links.Split("`r`n")){ | |
$results+= $link | |
} | |
$results=$results | sort -u | |
foreach ($result in $results){ | |
$request = [System.Net.WebRequest]::Create($result) |
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
$CompleteDir = "D:\Movies\" | |
$Files = Get-ChildItem $CompleteDir -Recurse | where {!$_.psiscontainer} | |
$Files | Where Length -LT 400000000 | Where Extension -ne ".srt" | Remove-Item -Verbose -Force | |
$CompleteDir = "D:\Movies\!New Releases" | |
get-childitem $CompleteDir -Recurse | ForEach-Object { Move-Item -LiteralPath $_.FullName $_.FullName.Replace("[",".(") -Force} | |
get-childitem $CompleteDir -Recurse | ForEach-Object { Move-Item -LiteralPath $_.FullName $_.FullName.Replace("]",").") -Force} | |
get-childitem $CompleteDir -Recurse | ForEach-Object { Move-Item -LiteralPath $_.FullName $_.FullName.Replace("..",".") -Force} |
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 Create-AesManagedObject($key, $IV) { | |
$aesManaged = New-Object "System.Security.Cryptography.AesManaged" | |
$aesManaged.Mode = [System.Security.Cryptography.CipherMode]::CBC | |
$aesManaged.Padding = [System.Security.Cryptography.PaddingMode]::Zeros | |
$aesManaged.BlockSize = 128 | |
$aesManaged.KeySize = 256 | |
if ($IV) { | |
if ($IV.getType().Name -eq "String") { | |
$aesManaged.IV = [System.Convert]::FromBase64String($IV) | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="generalize"> | |
<component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<DoNotCleanUpNonPresentDevices>false</DoNotCleanUpNonPresentDevices> | |
<PersistAllDeviceInstalls>false</PersistAllDeviceInstalls> | |
</component> | |
</settings> | |
<settings pass="oobeSystem"> | |
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
NewerOlder