My automation scripts (in PowerShell, Python)
These instructions will get you a csv file of Azure CDN links from your local resource.
You can import the exported csv file to your favorite IDE (I use PowerShell ISE and Pycharm).
- Windows PowerShell - 5.0 or higher
Your PowerShell's execution policy needs to be "Unrestricted".
You can set it by below command:
Set-ExecutionPolicy Unrestricted -Force
The function writes logs where you use the function in the script.
Log files will be saved in a folder where you saved the script file.
After specifying your source's local path you need to generate Azure CDN links, the script will check if it exists.
It will generate Azure CDN links with specified Azure CDN link form.
It will export generated Azure CDN links to a csv file and save it to a folder where you saved the script file.
The example below shows how to write logs by using writeLog function:
PS C:\> writeLog -Msg " [Start] Generating Azure CDN links"
The example below shows how to generate Azure CDN links by using cdnLinkGeneration function:
cdnLinkGeneration -localSourcePath 'your local path needs to generate CDN links' -cdnLinkForm 'your Azure CDN's endpoint hostname + container name'
PS C:\> cdnLinkGeneration -localSourcePath 'E:\contents' -cdnLinkForm 'https://cdnEndpointhostname/containerName'
The example below shows how to export Azure CDN links to a csv file by using csvExportation function:
PS C:\> csvExportation
- Peter G. Kim (https://github.com/pdkpgk)
- Anyone who needs to generate Azure CDN links for any usage
- Appreciation to HIM