Get the certificate selected in Get-Credential

Following Matt Bongiovi’s post at the Hey, Scripting Guy! Blog about PowerShell support for certificate credentials, I ported the main parts of the c# code he references in his post to PowerShell. So here you have, a quick-and-dirty Get-CertificateFromCredential function you can use to get the certificate for the credentials the user selected from the…

1

Detect .NET Framework versions installed

This script will detect the various .NET Framework versions installed on the local or remote computer(s). It queries the registry for the information (Remote Registry is required for querying the remote computer), and lists the .NET Framework version and it’s build. The logic and version information are based on https://msdn.microsoft.com/en-us/library/hh925568 The script file is available…

2

Get and Set the machineKeys in machine.config

In an ASP.NET web application, if you use ViewState, Session, Forms authentication, or other encrypted and/or secured values, these values are encrypted and decrypted using a set of keys called decryptionKey and validationKey located in the machineKey element under the system.web section in the .NET’s machine.config file. Normally, these keys are automatically generated every time…

2

Get and Set the compilation debug flag in web.config

Since the main technology I support as a PFE is IIS, I often find myself writing scripts for IIS or ASP.NET management. For example, one of the first things I check when troubleshooting ASP.NET applications is the debug flag in the web.config. For this, I’ve written the following two example functions that use the accelerator…

0