Category "powershell"

How to install themes for Oh My Posh in Powershell 5.1?

I use Powershell 5.1 daily in Windows Terminal. However, since a few days, my Oh My Posh theme stopped working, and printed an error that said it couldn't find

How to install themes for Oh My Posh in Powershell 5.1?

I use Powershell 5.1 daily in Windows Terminal. However, since a few days, my Oh My Posh theme stopped working, and printed an error that said it couldn't find

Getting a 'WS trust response'-error when executing Connect-PnPOnline in Powershell

Since I updated the Powershell Pnp-module to the latest version (1.10.0) I get the following error when trying to connect to PnpOnline: PS C:\Users\Admin> Co

Azure DevOps REST API, retrieve current environment status

We have a small development/testing environment setup on Azure VMs that only run during business hours. Sometimes one of our Devs may complete a PR after hours.

Azure DevOps REST API, retrieve current environment status

We have a small development/testing environment setup on Azure VMs that only run during business hours. Sometimes one of our Devs may complete a PR after hours.

Unable to Access SharePoint using PowerShell

I have registered an Application on Azure and I am trying to get an access token using the following command. $Auth=Get-ODAuthentication -ClientId 01xex4x7-f0e2

How to get/print the daily cap. of the app insights using azure powershell commands?

I tried the below commands but getting this error https://aka.ms/cli_ref Read more about the command in reference docs ERROR: argument --app/-a: expected one a

Powershell pagination with page token

I am trying to curl an API on loop while the page token is not empty. Essentially get all the results. I am having difficulties implementing the pagination. $he

Powershell 5.0 doesn't see PATH environment variables under User account

I added an environment variable to my System Path -> C:\Program Files\TEE-CLC. After that, I expect, that I can run my foo.exe which is under C:\Program File

Check if a value in a list exist in a column and if not, write the non existing value to the next column

I have a csv file containing metadata exported from a pst e.g from, to, cc, bcc. I have a list i can query: \*\*my list \*\* Wayne, John little, Joe I have mul

AzureAD Powershell cmdlets work locally but erroring in Azure DevOps Microsoft Hosted Agent with "Error reading JToken from JsonReader"

I have a powershell script that runs locally on my Windows Desktop running powershell 7.2.1. However when run on a Microsoft Hosted Windows-Latest agent in Azu

use Invoke-AzVMRunCommand -Params

I am trying to use the command like so: a = 345 name = "myVM" Invoke-AzVMRunCommand -ResourceGroupName $RGName -Name $VMName -CommandId 'RunPowerShellScript' -S

how to run powershell command from nushell

After installing nushell (https://www.nushell.sh/) in my windows environment, I want to use the power of nushell in conjunction with powershell. For example, I

How to refresh analysis service database using Powershell

What Powershell command refreshes a database in analysis service (SSAS)? I would like to see server parameter and database name parameter too. Also, I want to

Powershell Script Returning Blank Lines, Correct Amount of Lines for Output but nothing in Them

Problem Break-Down So I'm trying to return a list of all the security user groups a user is in but have it be broken up by manager. I take a couple of steps to

Powershell - Azure AD Application Registration - how to set ID tokens?

Background Information I have two separate PowerShell scripts. One uses an ARM template to deploy a function app, along with storage accounts etc. It runs unde

How to suppress warning message from script when calling Set-ExecutionPolicy

I am writing a script to prepare our laptops before use. It essentially installs certificates and sets the executionpolicy to AllSigned. It gets executed by

Powershell certificate scripting using HttpClient

I am looking to use powershell to get certificate information from different API's using HttpClient. (Trying to write a script to find when certificates expire)

Robocopy grabbing just the google chrome bookmarks files

robocopy \\$OldComputername\C$\Users\$Username\Appdata\Local\Google\Chrome\"User Data"\Default \\$NewComputerName\C$\Temp\$Username\Appdata\Local\Google\Chrome\

Can I run a task within a PowerShell script?

I am brand new to Ansible Playbooks and I have checked a bunch of different documentation without success. So here is what I want to do. My company wants me to