Posts

Showing posts from April, 2018

Using Saved Credentials with PowerShell Scripts

Most of the time in a Windows environment, a Windows PowerShell script runs in the security context of the user account that is running it. If you have a scheduled task that runs a PowerShell script then you can specify a user account (service account) that is used to run the task. The service account needs to be assigned the necessary permissions to perform any actions in the script. In some cases, you need to script to access remote resources and sign in. For example, if you have a scheduled task that pulls reporting information from Office 365. PowerShell has a method for storing encrypted credentials that can only be accessed the user account that stored them. The code below prompts you for a credential and then stored is encrypted in an XML file. $credential = Get-Credential $credential | Export-CliXml D:\credential.xml To retrieve the credential and using it within a script, you read it from the XML file: $credential = Import-CliXml D:\credential.xml If you created the XML file w

Front Panel Mic Input Generates Static

I recently learned that many computers suffer from high levels of static when using the microphone input on the front of the computer. My computer certainly has that issue, but I didn't realize it was  common. The static is caused by interference from signals on other cables. The front microphone connector is connected to your mother board by a long thin unshielded cable. So, there are plenty of power cables for devices such as hard drives or USB that can cause interference. On my computer I was able to get rid of the static by unplugging the front USB ports from my mother board. However, that was very annoying when I wanted to use USB devices. My laptop doesn't have the static issue for the microphone. I'm assuming that's because the connector is directly on the motherboard like the back connector on my computer. The back mic port on my computer also does not have static. However, it's awkward to access the rear ports. The fix for my old headset was to buy an ine