Tag Archives: powershell

How to deploy Azure Data Factory pipeline and its dependencies programatically using PowerShell

Since ADF unfortunately doesn’t provide a built-in way for automated deployment, to do this you have to write a custom script. Then you can run it on build server such as VSTS or TeamCity. If you’re in the interactive mode, … Continue reading

Posted in Programming | Tagged , | 16 Comments

How to install PowerShell using PowerShell

This cmdlet is tricky to find in Google because searching for install powershell using powershell won’t give you much. So here it is: Install-WindowsFeature PowerShell or Install-WindowsFeature PowerShell-V2 P.S. How to find exact name of particual Windows Feature to install? … Continue reading

Posted in Infrastructure | Tagged | Leave a comment

How to start using recently uploaded Azure disk

After you uploaded a vhd and before you can start really using it you must mark it as a data disk or as an OS disk using the following command: Add-AzureDisk -DiskName ‘myvhd.vhd’ -MediaLocation http://example.blob.core.windows.net/container/myvhd.vhd -OS Windows

Posted in Infrastructure | Tagged , | Leave a comment

How to re-create symlinks of VM configs in Hyper-V using PowerShell

Hyper-V keeps VM configs at %ProgramData%MicrosoftWindowsHyper-VVirtual Machines as a symlink to the original location. You may get them broken due to various reasons, e.g.: Server disaster Upgrade to next version of OS/Hyper-V and then rollback Migration To restore functioning you … Continue reading

Posted in Infrastructure | Tagged , | Leave a comment

How to select Azure subscription if you have more than one using PowerShell

If you have more than one Azure subscription in your account and try to upload a vhd using the instruction: Get-AzurePublishSettingsFile Import-AzurePublishSettingsFile d:credentials.publishsettings Add-AzureVhd -LocalFilePath d:my.vhd -Destination http://example.com/blob/container You may get an error saying that selected account doesn’t have given … Continue reading

Posted in Infrastructure | Tagged , | Leave a comment