Category Archives: Scripting & programming

Somthing about Powershell, VB Script, C#, VB.NET

Powershell: Export/Convert a X509 Certificate to pem format

Hi,

powershell respectively the .NET framework does not offer a method to export a X509 certificate in PEM format. The pem format is a Base64 encoded view from the raw data with a header and a footer.

An example to export the machine certificate (with Thumbprint: 1C0381278083E3CB026E46A7FF09FC4B79543D) of an computer
Continue reading Powershell: Export/Convert a X509 Certificate to pem format

Advertisment to support michlstechblog.info

Powershell: Convert Hex to Int type

Hi,

short post today. Topic: convert a hex string to an integer type.
Continue reading Powershell: Convert Hex to Int type

Windows: Get Disk Smartparameter and Health status

Hi,

in newer Versions of the Windows operating system you to not need additional tools to get the most important Harddisk smart parameters.
Continue reading Windows: Get Disk Smartparameter and Health status

PowerCli: Invoke-VMScript fails with “An error occurred while sending the request”

Hi,

you want to call some commands in a VM and you got the following error “An error occurred while sending the request”
Continue reading PowerCli: Invoke-VMScript fails with “An error occurred while sending the request”

VMware: Set MAC Address of a kernel interface with PowerCli

Hi,

the New-VMHostNetworkAdapter offers the ability to set the MAC address while adding a new kernel interface. But this has a limitation. It always only a MAC within a range 00:50:56:00:00:00 – 00:50:56:3F:FF:FF.

If you try it even though you will get an error:

New-VMHostNetworkAdapter The MAC address is invalid or is not in the valid range 00:50:56:00:00:00 - 00:50:56:3F:FF:FF.

Continue reading VMware: Set MAC Address of a kernel interface with PowerCli