As you are aware, we can use ConvertTo-Json cmdlet to convert an object to Json output format using PowerShell. However, there is something you need to be aware of while using conversion. By default, it does not work with very large objects (containing of multiple sub-objects) and converts them properly. This is because of the fact that the Depth parameter for ConvertTo-Json has a default value of 2. Let’s understand what this means.
For our example, we’ll create a JSON file with below details first and save it on to your local machine as new-json.json
Continue reading “Working with ConvertTo-Json output issues”
Recently, if you have been trying to deploy Azure Resource Group template using Visual Studio, you might see below error:
[ERROR] Add-AzureRmAccount : A parameter cannot be found that matches parameter name
[ERROR] At line:1 char:2379
[ERROR] + ... xmg' -AccountId 'email@example.com' -EnvironmentName 'AzureC ...
[ERROR] + ~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : InvalidArgument: (:) [Add-AzureRmAccount], Param
[ERROR] + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.
[ERROR] Run Login-AzureRmAccount to login.
Continue reading “Azure Resource Group Error: A parameter cannot be found that matches parameter name ‘EnvironmentName’”
If while working on Azure SQL PaaS or even on-premise SQL database, you are stuck with this error “Index was outside the bounds of the Array. (Microsoft.SqlServer.smo)”, the most likely reason is that the version of SQL server management studio on your local machine is on the lower version that the SQL server version on the server end.
In such a scenario, you would need to upgrade the SSMS version installed on your local machine. Apparently, the reason behind the error message is that SQL couldn’t show new features in your old SSMS version. Continue reading “SQL Error : Index was outside the bounds of the Array (Microsoft.SqlServer.smo)”
This blog post is to discuss output encoding format used when data is passed from one PowerShell cmdlet or to other applications. This is a rarely understood feature unless you are trying to write some module which integrates PowerShell with another software.
Passing output between PowerShell cmdlets
The Strings inside PowerShell are 16-bit Unicode, instances of .NET’s System.String class. So by default, when you pipe output from one cmdlet to another, it is passed as …Continue Reading
It might happen while configuring security realm / authorization, your admin account may be locked out and you are no longer able to reconfigure Jenkins.
When this happens, you can fix this by the following steps:
- Stop Jenkins (the easiest way to do this is to kill …Continue Reading
Consider this scenario:
- You have hyper-v installed on a windows server/client OS and it’s working fine
- 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. …Continue Reading
Consider this scenario:
- You have installed Jenkins on a windows server
- You are building visual studio project using msbuild plugin in Jenkins
- Your build keeps failing with below message:
error MSB4018: The "CompileWorkflowTask" task failed unexpectedly.
error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the
error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode,
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 happen …Continue Reading