Created
June 21, 2019 00:42
-
-
Save viksingh/2f0774ee89b8e6c332128861b97c38b8 to your computer and use it in GitHub Desktop.
This file contains 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
# Provide the name of your resource group | |
$ResourceGroupName="**********" | |
# Provide the name of your Storage account. | |
$StorageAccountName="**************" | |
# Provide the Storage account key | |
$StorageAccountKey = '**********' | |
# Provide the name for your Azure Files share. | |
$ShareName = "modulecode3" //File share name in the storage account | |
# Provide the name for your Directory. | |
$DirectoryName = "RunbookOne" //Filename for download | |
# Provide the full path to the file you want to upload. | |
$FullPathToFile = (Get-Module -ListAvailable <ModuleName>).path | |
Write-Output 'Path to manifest file' $FullPathToFile | |
$FullPathToFile = $FullPathToFile.replace("psd1","psm1") | |
Write-Output 'Path to script module file' $FullPathToFile | |
$Context = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey | |
# Upload a file to the directory in the file share | |
Set-AzureStorageFileContent -ShareName $ShareName -Source $FullPathToFile -Path $DirectoryName -Context $Context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment