Category "powershell"

Installing Dolt on Windows 10

I was trying dolt out for windows for a project ran into this error Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied. I think its was permission

How to create a JSON body with PowerShell which is Deserializable by .NET6 when using az rest to call a .NET6 Azure Function

We are using AzureCLI to be able to call an Azure Function endpoint upon a successful deployment. The call to get token works and the call to our azure functio

Powershell: Using Get-ChildItem with variables

I am writing a script that will iterate through folders, grabbing substrings of the folder names as variable values, and then iterate through the log files in e

Understanding Powershell: example - Convert JSON to CSV

I've read several posts (like Convert JSON to CSV using PowerShell) regarding using PowerShell to CSV. I have also read that it is relatively poor form to use

Programmatically change Keyboard Layout

I work in a Swiss company environment with de-CH as the standard keyboard-layout, while using a de-DE keyboard. I'm able to change my keyboard settings manuall

Windows10 Powershell - Alarm, World Clock, Timer, Stopwatch?

Windows 10 has a decent little Application that lets you set multiple Alarms, World Clocks, Timers and Stopwatches. Powershell also has some Stopwatch function

It there a way in powershell to make a positive number to a negative number whitout using multiplication?

I was wondering if there is a way to make a positive number into a negative number whitout using a multiplication like $b = $a * -1 I'm looking for the most cos

How to deploy Update Management to Azure resources the programmatic way

I'm currently trying to setup Azure's Update Management Solution to a resource group I have setup. I've read through a lot of documentation on this matter inclu

Opening MS Access database with Powershell?

I am trying to open a form in an access database using powershell: $application = New-Object -ComObject Access.Application $Fullpath = "path.accdb" $appli

Converting C# into Powershell with DllImport involved

I've recently been working on a little side project to see if I can get a little memory editing to work with PowerShell. I put together a small script in C# tha

How to pass a custom function inside a ForEach-Object -Parallel

I can't find a way to pass the function. Just variables. Any ideas without putting the function inside the ForEach loop? function CustomFunction { Param (

Tried to install oh-my-posh but it tells me that "the term is not recognized as..."

So I tried installing oh-my-posh for windows with Install-Module oh-my-posh -Scope CurrentUser and typed Get-PoshThemes to see the available themes which I down

$PSScriptRoot empty when called with Powershell ScheduledJob using -Filepath parameter

The automatic variable $PSScriptRoot isn't populating when using a Powershell ScheduledJob (not to be confused with a ScheduledTask). A ScheduledJob with the -

Azure Automation Runbook ADAL SQL support

I am attempting to use an Azure Automation Runbook to run a query against an Azure SQL database using Azure AD credentials: $cred = Get-AutomationPSCredential

Azure CLI Exception Handling

I have installed the azure cli on my local system and I am able to run the azure cli commands in Windows Powershell. When I run any command which is not correct

Error running SSRS powershell cmd

I'm running the Powershell commands below from my desktop to deploy the SSRS reports to the on a dev report server. I get the error below: Commands: Write

TFS 2017 Build: Cannot Run PowerShell

We are using TFS 2017 and it has several builds configured. A little while ago we started getting an error on the second step, which is to run a PowerShell Scr

Powershell for creating folders and subfolders from csv

I try to prepare a script that will create folders and subfolders from CSV. When I create a CSV with 1 column 'Name' like so Name XYZ ZXX FFF with the follo

Prevent integrated terminal from opening automatically

Whenever I open a PowerShell script in VS Code, the integrated terminal opens. How can we prevent the integrated terminal from opening automatically. I have sea

Issue when setting IIS binding certificate in Powershell

I'm writing a Powershell script to go through my list of IIS bindings, find any that have a particular 'old' cert thumbprint, and replace their certs with a cer