PowerShell script as a Windows scheduled task

If the problem you’re having is with Execution Policy, then you can also set the execution policy of a specific invocation of PowerShell. This is what I usually do when executing PowerShell through a scheduled task: Why? -NoProfile This ensures that you don’t rely on anything in the user’s PowerShell profile, and avoids the overhead of … Read more

Exporting a PFX Cert to Base64 Cer and Key files

Getting the .CER file Start by exporting the cert nomrally throguh MMC. On the Certificate Export Wizard, do not export the private key. Change the encoding to BASE-64 and export cert cert as you normally would. Getting the .key file Export the key again from MMC but this time, export the private key. This will … Read more

Redirect all HTTP to HTTPS in IIS

create a host wide redirect using IIS Manager. Select URL Rewrite, Add Rule(s)…, and Blank rule. Name:Redirect to HTTPS Match URLRequested URL: Matches the PatternUsing: WildcardsPattern: *Ignore case: Checked ConditionsLogical grouping: Match AnyCondition input: {HTTPS}Check if input string: Matches the PatternPattern: OFFIgnore case: CheckedTrack capture groups across conditions: Not checked Server VariablesLeave blank. ActionAction type: RedirectRedirect URL: https://{HTTP_HOST}{REQUEST_URI}Append query string: Not checkedRedirect type: Permanent (301) Apply the rule and run IISReset (or … Read more

rclone: Usage

In this section, we’ll cover a few basic commands to get your HPC directories and OneDrive folders synced. First, you can list files and directories in the remote drive (OneDrive). In this command, you start by using the rclone command, followed by the list command. Then, the name of the remote service is needed, here … Read more

rclone: Configuration for MS OneDrive

Next, run the rclone configuration. A prompt will notify you that no remote connections exist. To set up a new connection, type n. It will prompt you to enter a name. Enter the name, in this case, remote. A lot of information will populate the screen. The first will be a list of available services. In this … Read more

Convert an ESD File to a WIM File

Convert ESD Create a folder. Go to the sources directory on your installation media. Copy the install.esd file to the folder. Open Command Prompt as Administrator. Change directory to the working directory. Show the available images within the install.esd file. Determine the Index number to modify (in this example we are modifying Index 2) Export the … Read more

Synchronizing your computer’s clock to a time server

From an administrative command prompt To poll an ntp server for time: NTP GPO details explained So what all these settings mean. Configuring Windows NTP Client: Enabled NtpServer: Here you specify which NtpServers to use seperated by a space but also with a special NTP flag. I decided to use the public ntp.org pools:0.se.pool.ntp.org,0x1 1.se.pool.ntp.org,0x1 2.se.pool.ntp.org,0x1 … Read more

Fixing Windows Updates

A common error with Windows update is error 80070057. To resolve, stop the Windows Update service and delete the C:\Windows\SoftwareDistribution folder. Restart the service and check for updates will succeed.