Tag Archives: powershell

Powershell: Define a x509 certificate in a script

Hi,

the best way to store a certificate in a powershell script is in an byte array. But how to get such a byte array as string from an existing certificate?
Continue reading Powershell: Define a x509 certificate in a script

Advertisment to support michlstechblog.info

Windows: Set or edit environment variable from powershell

Hi,

powershell can set,edit or delete environment variables as well as cmd.exe command line interpreter.
Continue reading Windows: Set or edit environment variable from powershell

Powershell: Convert a string into a securestring and back to plaintext

Hi,

.Net and therefore the powershell has the ability to define a secure string. This means that the string is immediately deleted from memory if it is no longer needed.
Continue reading Powershell: Convert a string into a securestring and back to plaintext

Windows: Get, set or change the network access type or network category

Hi,

to get and the network access type and the network category use the powershell commandlets Continue reading Windows: Get, set or change the network access type or network category

Powershell: Generate a GUID

Hi,

to create a GUID in powershell for the use in your own scripts call the static function NewGuid() from the system.Guid class.

PS D:\> [system.Guid]::NewGuid()
f3f8591a-c1d6-4d82-bec2-d3dac2c1fee5

Michael