Understand scopes in PowerShell – Part 1

This blog post covers some of most untalked rules about variable scope in PowerShell. It is untalked because most users never come across it. But it is useful to those who are trying to write a module or new cmdlets in the PowerShell or writing some product support in PowerShell.

It is to be noted that the rules don’t just applies to the variables, but they are also applicable to the aliases, functions, and Windows PowerShell drives (PSDrives). Essentially it controls where they can be read and changed.Read More »

Oracle virtual box fails to work on machine where hyper-v is installed

Consider this scenario:

  1. You have hyper-v installed on a windows server/client OS and it’s working fine
  2. You install oracle virtual box or any 3rd party virtualization application on machine and it fails with below error:
VT-x/AMD-V hardware acceleration is not available on your system. Certain guests 
(e.g. OS/2 and QNX) require this feature and will fail to boot without it.

Or vice-versa.Read More »

Install git on windows machine using chocolatey

Git (for Windows) – Git is a powerful distributed Source Code Management tool. If you just want to use Git to do your version control in Windows, you will need to download Git for Windows. You can choose to jump through several urls to find and download the right version or you can use the easier way. I’m going to explain the latter in this blog. For this post, you need to have Chocolatey installed on the machine. You can check here on how to do so.

Once you have done this, open a PowerShell prompt and run Read More »

Install the Hyper-V role and create virtual machines using PowerShell

This blog post covers how to install Hyper-V on a windows machine using PowerShell and create virtual machines. To learn more about Hyper-V including system requirements, see Hyper-V overview. Also make sure that you have administrative rights on the machine for doing so.

Install Hyper-V Role

On a windows server:

Open Windows PowerShell session with elevated user rights and run the following command:Read More »

Azure Certification: Where to Start? 2016 Edition

The choice of choosing which certification to obtain can be a tricky one, especially if you’ve never studied for or taken a Microsoft Certification exam before. It can also be daunting if you don’t know anyone else who has done it either. You shouldn’t let this discourage you. It may be a bit confusing, but it’s actually not all that complicated. Check this article for more details:

https://buildazure.com/2016/09/29/azure-certification-where-to-start-2016-edition/amp/?utm_content=buffercf6de&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

It outlines some Read More »

The “CompileWorkflowTask” task failed unexpectedly – Jenkins build failure

Consider this scenario:

  1. You have installed Jenkins on a windows server
  2. You are building visual studio project using msbuild plugin in Jenkins
  3. Your build keeps failing with below message:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Workflow.targets(121,5): 
error MSB4018: The "CompileWorkflowTask" task failed unexpectedly. 
[D:\TFS_WS_DEV\Source\ALERT.Process.Workflows\ALERT.Process.Workflows.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Workflow.targets(121,5): 
error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the 
path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\it1lwybv.tmp'. 
[D:\TFS_WS_DEV\Source\ALERT.Process.Workflows\ALERT.Process.Workflows.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Workflow.targets(121,5): 
error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, 
String maybeFullPath) 
[D:\TFS_WS_DEV\Source\ALERT.Process.Workflows\ALERT.Process.Workflows.csproj]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Workflow.targets(121,5): 
error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, 
FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, 
Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

There are two reasons this could happenRead More »