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
| # Allow remote scripts | |
| Set-ExecutionPolicy AllSigned | |
| # Install SqlServer powershell modules | |
| Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
| Install-Module -Name SqlServer | |
| # Misc | |
| Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -All |
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 files to process | |
| $sourcePath ="[[UPDATE WITH FOLDER PATH]]" | |
| $sourceFiles = Get-ChildItem -Path $sourcePath -File -Recurse -Filter *.png | |
| # | |
| $currentFolder = "" | |
| $generatedGalery = "" |
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
| cls | |
| # CONSTANTS | |
| $inkscapePath = "C:\Program Files\Inkscape\bin\inkscape.com" | |
| # Get files to process | |
| $sourcePath ="[[UPDATE WITH YOUR PAT]]" | |
| $sourceFiles = Get-ChildItem -Path $sourcePath -File -Recurse -Filter *.svg |
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
| <rule name="ForceWWW" stopProcessing="true"> | |
| <match url=".*" ignoreCase="true" /> | |
| <conditions> | |
| <add input="{HTTP_HOST}" pattern="^yoursite.com" /> | |
| </conditions> | |
| <action type="Redirect" url="https://www.yoursite.com/{R:0}" redirectType="Permanent" /> | |
| </rule> | |
| <rule name="HTTPtoHTTPS" stopProcessing="true"> | |
| <match url="(.*)" ignoreCase="false" /> |
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
| Import-Module WebAdministration | |
| $results = Get-ChildItem "IIS:\SslBindings\" | ForEach-Object { | |
| $store = $_.Store | |
| $thumbprint = $_.Thumbprint | |
| $cert = Get-ChildItem -Path Cert:\LocalMachine\$store | Where-Object { $_.Thumbprint -eq $thumbprint } | |
| [PSCustomObject]@{ | |
| Host = $_.Host; |
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
| <# | |
| .SYNOPSIS | |
| Generates a sitemap.xml file for a website by crawling its pages concurrently. | |
| .DESCRIPTION | |
| This script starts crawling from a specified base URL, discovers | |
| internal links, and maintains a list of found (unprocessed) and | |
| processed URLs in text files. It filters URLs to ensure only | |
| those belonging to the same domain are processed and allows | |
| excluding URLs that contain specific path patterns. |
OlderNewer