Category "powershell"

How do you make a foreach create multiple variables?

I'm trying to make a script that will check a bitlocker encryption percentage and set it as a variable but for each drive. For example. I run my script that wil

How to destroy resources created using terraform in azure devops pipeline by using PowerShell

I have a project where I'm using Terraform in Azure DevOps Pipeline create Infrastructure but want to destroy the infrastructure in a PowerShell script running

Run VS code projects through batch file

I have so many projects I have to open during windows startup. So I have created batch file to open them in vs code as following. start cmd /C code C:\project1

Is there a way to make sure formatted string is always in quotations?

I am working on a new tool to help automate some tedious processes. it involves ExchangeOnlineManagement, Python, and Powershell. I have input variables that I

Powershell to change RDWEB certificates remotely

About to give up on this and connect locally to each system and run the commands but thought it wise to ask the smart people first. With my credentials locally

How to require a dll inside .psd1 for a .psm1 that is being invoked from a .ps1?

I read a lot of the answers here and I can't seem to find what I am looking for. So please bear with me. Each psm1 is a class. I have: Main.ps1 Modules/module01

Subprocess $Env:Path python: The filename, directory name, or volume label syntax is incorrect

I am trying to change the windows environment variables, but I am having trouble doing so. Before I tried to use os.environ() I tried out using powershell comma

Use PowerShell module in ARM deployment script

I have an ARM template in which I wish to execute a powershell script. In this question it is hinted that it should be possible to install powershell modules in

Best way to call and access powershell script in ASP.NET Core project

I have a PowerShell script which I have to call in an ASP.NET Core Web API solution. What is the best way to use the PowerShell script in an ASP.NET Cre Web API

How can I get a variable valued current working directory (pwd) in powershell profile

I was trying to use anaconda as my Python virtual environment, and my virtual environment is stored in project directory. Manually, I need to use following comm

ImportPSModule RequiredVersion is ignored

I'm trying to import a specific version of a PowerShell module. I have to do it from .NET. However, the RequiredVersion is simply ignored. Even if I use a non-e

Powershell batch renaming files with index

for a personal project I want to prefix folder and file names with an index. The goal is to have every childitem name remain the same except for the prefix. My

Graph API - Temporary Access Pass Generation

Have the following script that is trying to create a csv of TAP codes using the Graph API. Currently getting an Error 401 Unathorised error when reaching Invoke

Calling Azure Automation runbook from ADF Webhook activity - Fails with "Cannot bind argument to parameter 'InputObject' because it is null."

we are trying to call an Azure Automation Runbook from a Webhook activity in a Azure Data Factory pipeline. We work from the instructions provided in this blogp

How to Extract the variable values from terraform variables.tf file using PowerShell commands

I have a variables.tf file which contains all the project variables and im trying to fetch a variable values using PowerShell. variables.tf variable "products"

Powershell functions defined in profile

I have a function called GreatFuncion1 defined in "profile.ps1" loads when powershell launches and works ok how can I get the path where this function was defin

unrecognized arguments: –html

I am trying to create an application using Azure App service. However, it shows the above error: unrecognized arguments: –html The command that I use is a

How to install SQL Server PowerShell module on my company's server

Environment: Windows 2016 Server Standard PowerShell 5 Has Internet connection Running PowerShell as administrator JFrog is something new we're implementing but

Can I ship Test-Json from pwsh with my software?

Is it possible to ship cmdlet Test-Json only with my software or a dll that contains it from pwsh? I downloaded the entire pwsh zip file but not sure which one

using PowerShell, Is there an easier or better optimized way to get the download link to the latest Nvidia Driver?

Hello all, I've been able to get this code to get the latest download link for Nvidia Driver for a Quadro P1000. I was wondering, if there's a better way to do