Skip to content

Tag: PowerShell

Microsoft PowerShell

PowerShell 1

[NoBrainer] Using ODATA Actions via PowerShell

Have you ever tried to use ODATA Actions from PowerShell and realized that the Service Reference in your class library does not expose them? You can actually do it via the model’s ‘Execute()’ method. Here is a quick description on how to do it without writing too much URL style code. Let’s presume we have a model referenced in a […]

LightSwitch 3

[NoBrainer] Saving bandwidth with JSON when consuming ODATA services from PowerShell

When working with ODATA sources from PowerShell via a service reference (instead of using explicit REST call via Invoke-RestMethod) the .NET DataServiceClient will use Atom/XML under the hood. This works perfectly well except it consumes much more bandwidth because of the XML data format. As the whole ODATA interface is encapsulated via your service reference it really does not make […]

LightSwitch 2

WebAPI and “The response to this POST request did not contain a ‘location’ header. That is not supported by this client.”

I just came across another nuisance in .NET WebAPI that I want to share with you quickly. In one of our LightSwitch projects we use WebAPI ODATA controller to help out when LightSwitch internal capabilities come to their end. As we are using a PowerShell once in a while as you might already have guessed from our web site we […]

PowerShell 0

Working with JIRA SOAP service via PowerShell

It might sound old school and the JIRA SOAP service is announced to be removed with version 7 (https://developer.atlassian.com/display/JIRADEV/Preparing+for+JIRA+6.0#PreparingforJIRA6.0-SOAPandXML-RPCdeprecatedinJIRA6.0) but the JIRA SOAP protocol is really easy to use from PowerShell as of the nifty ‘New-WebServiceProxy’ Cmdlet that abstract the SOAP protocol behind typed .Net objects. So whenever you want to do a quick upload of a screenshot or get […]

PowerShell 0

[NoBrainer] PowerShell fails to Add-Type an assembly with HRESULT 0x80131515

When you try to add an assembly that you downloaded from a network share or the internet to your PowerShell session via ‘Add-Type -Path C:\folder\your-assembly-name.dll’ you might a receive an error like this: The result itself could give you a hint and querying the inter you will probably others experiencing the same error as described in Visual Studio Project Sample […]

PowerShell 4

biz.dfch.PS.vCAC.Utilities PowerShell Module available

Finally I made it and found the time to upload the biz.dfch.PS.vCAC.Utilties PowerShell module! It is available for download at Github and NuGet (see below for links) and placed under the Apache 2.0 license. How to install: Copy the module along with the XML configuration file into a directory with the same name as the module under a path that […]

PowerShell 0

vCAC and the difficult way to delete a Virtual Machine

The vCAC user interface is functional but has quite some limitations when you want to do selection based on different criteria the user enters. So for example, it is not possible to have cascading dropdown lists based on two parent lists or values. Furthermore you cannot select a physicl machine based on its location. And there are plenty more examples […]

PowerShell 0

Getting most out of vCAC without a CDK license

Did you ever get the response from VMware support or anyone else ‘for this you need a CDK license to make it work’? As it turns out this is a costly thing to have and in most cases you will not need it anyway. In addition, if you really come across something the ‘CloudUtil.exe’ does not let you do, you […]

PowerShell 2

Introducing the vCAC VMPS SOAP ProvisionService

Besides the well used ManagementContext vCAC also has some SOAP services for basic infrastructure communication and provisioning. With the ProvisionService, VMPS for short, you get a wrapper around some basic vCAC workflows and helper functions that abstract data manipulation of the MangementContext and others. Using this service with PowerShell is pretty straightforward with the help of the ‘New-WebServiceProxy’ Cmdlet. For […]