Skip to content

Commit

Permalink
Sciprts para subir un VHD a Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
adiazcan committed Oct 24, 2014
1 parent 0011382 commit 9ca0000
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SharePoint/Azure/ConnectAzure.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Add-AzureAccount
Get-AzureSubscription
Select-AzureSubscription "Visual Studio Premium con MSDN"
21 changes: 21 additions & 0 deletions SharePoint/Azure/UploadVHD.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#UPLOADING

$sourceVHD = "D:\StorageDemos\myvhd.vhd"
$destinationVHD = "https://mwwestus1.blob.core.windows.net/uploads/myvhd.vhd"

Add-AzureVhd -LocalFilePath $sourceVHD -Destination $destinationVHD -NumberOfUploaderThreads 5

# Register as a plan old data disk
Add-AzureDisk -DiskName 'mydatadisk' -MediaLocation $destinationVHD -Label 'mydatadisk'

# Register as a plan old data disk
Add-AzureDisk -DiskName 'myosdisk' -MediaLocation $destinationVHD -Label 'myosdisk' -OS Windows # or Linux


#DOWNLOADING
select-azuresubscription "mysubscriptionname"

$sourceVHD = "https://mwwestus1.blob.core.windows.net/uploads/mydatadisk.vhd"
$destinationVHD = "D:\StorageDemos\mydatadisk-downloaded.vhd"

Save-AzureVhd -Source $sourceVHD -LocalFilePath $destinationVHD -NumberOfThreads 5
3 changes: 3 additions & 0 deletions SharePoint/SharePoint.pssproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<Content Include="Audit\GetWebAppsMUI.ps1" />
<Content Include="Audit\Inventory-SPFarm.ps1" />
<Content Include="Audit\User Access Report.ps1" />
<Content Include="Azure\ConnectAzure.ps1" />
<Content Include="Azure\UploadVHD.ps1" />
<Content Include="Deployment\Activate-Feature.ps1" />
<Content Include="Deployment\ActivateFeature.ps1" />
<Content Include="Deployment\FunctionsCommons.ps1" />
Expand Down Expand Up @@ -94,6 +96,7 @@
<ItemGroup>
<Folder Include="Audit\" />
<Folder Include="Deployment\" />
<Folder Include="Azure\" />
<Folder Include="Utils\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand Down

0 comments on commit 9ca0000

Please sign in to comment.