Runner.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
clear

cd $PSScriptRoot
Import-Module .\ProductivityTools.AzureAutomation.psm1 -Force

#CreateResourceGroup -Profile "AzureProductivityTools2" -Verbose
#RemoveResourceGroup -Profile "AzureProductivityTools2" -Verbose

#Push-FileToAzureBlobStorage -Profile "AzureProductivityTools2" -Path ".\blob\usflag.png" -Prefix "test" -Verbose
#Get-AzureBlobStorageFiles -Profile "AzureProductivityTools2"
#Remove-AzureBlobStorageFile -Profile "AzureProductivityTools2" -BlobName "test/usflag.png" -Force
#Get-AzureBlobStorageFiles -Profile "AzureProductivityTools2"
Remove-AzureBlobStorageFile -Profile "AzureProductivityTools2"-Name "PowershellApps.rar"
function RemoveAll{
    [cmdletbinding()]
    param()
    Write-Verbose "Hello from RemoveAll"
    
    $profile= "AzureProductivityTools2" 
    
    Remove-StorageContainer -Profile $profile -Verbose
    Remove-StorageAccount -Profile $profile -Verbose
    Remove-ResourceGroup -Profile $profile -Verbose
}

function CreateAll{
    [cmdletbinding()]
    param()
    Write-Verbose "Hello from CreateAll"
    
    $profile= "AzureProductivityTools2" 
    
    Create-ResourceGroup -Profile $profile -Verbose
    Create-StorageAccount -Profile $profile  -Verbose
    Create-StorageContainer -Profile $profile  -Verbose
    #Set-StorageAccountCustomDomain -Profile $profile -Verbose
}
#CreateAll -Verbose
#RemoveAll -Verbose