Category "powershell"

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

How to remove nth column from the text table in powershell?

Let’s say I am working with a nicely formatted table. Take kubectl output for example: NAME READY STATUS RESTARTS AGE IP NO

How to get service recovery options from Powershell?

I'm having issues figuring out an easy way to get the recovery options of a particular service in powershell. Using command line sc: sc qfailure [servicename]

Behavior of bat and Powershell is different when clicked vs run from respective consoles, specifically with git

This post appears wordy, but there's actually not much here to read. Just figured more details > less details. I am working on some tools to speed up my git

Powershell script to search mutiple remote PC's for specific files

I am attempting to run a powershell script from my PC against a txt file that contains numerous remote PC's. I want to run a script against that list of PC's t

How can i count Get-SFTPChildItem folder size together?

I need help with my Project I'm trying to display the size of a folder called sh-modules but only thing I can achieve is displaying individual subfolder sizes..

I am parsing RoboCopy logs from Millions of files, How can I make my code run Faster?

New to StackOverflow, I'll do my best to post correctly :) Hoping someone can help me to get my code running faster. The code is run against RoboCopy Migration

I am trying to connect to databricks through cli, wated to replicate same in Azure devops

In the local system i am writing commands: pip install databricks-cli databricks configure--token token value and later token Now the thing is In azure devops i

PowerShell module function does not inherit WhatIf

TL;DR: Why do module functions not inherit -WhatIf implicitly when called from a script? It was my understanding that cmdlets and functions will inherit switche

Run executable in the same folder via PowerShell

I have a PowerShell script from which I want to run an executable in the same folder: RunTests.ps1 .\nunitlite-runner.exe When I right click the script in t

Powershell script for catching exception for adding group members to local group

I want to add members in Remote Desktop Users group and if i find "The specified account name is already a member of the group" exception then skip and move to

How can I change the time that an e-mail was received via Microsoft Exchange Server or Microsoft Outlook?

As the question says, how can I change the time that an e-mail was received either via Microsoft Outlook or via Microsoft Exchange Server (as an Administrator a

Use PowerShell to extract GPS Latitude etc. (Properties > Details) from an image file

I am looking for a way to extract the GPS Latitude and Longitude values from a lot of .jpg files. I know that Exiftool can sort of do it, but as the values I'm

Why is 'python' not recognized in powershell?

I have installed python 3.6 in my Windows 10 PC. I also use Pycharm to make my scripts. It runs perfectly fine there. But my problem is I can't run python in po