Questions tagged [powershell]

Ask Question

PowerShell is a cross-platform command line and scripting utility from Microsoft. Use this tag for questions about writing and executing PowerShell scripts ONLY. Programming questions specific to the cross-platform version PowerShell Core (Windows, macOS, and Linux) should be tagged [powershell-core]. Questions about system administration should be asked on Super User or Server Fault.

103,982 questions
0 votes 1 answer 6 views

Passing Header Auth Bearer token as variable in Powershell Invoke-RestMethod

I have the below code, where i am trying to capture the access token and passing it as a variable in the Headers section for Bearer token, but looks like the $Token.access_token is not getting ... user avatar wehelpdox
  • 141
0 votes 0 answers 13 views

What's the difference between using Set-Variable vs. $varName = in PowerShell? [duplicate]

What's the difference between defining a variable using these two ways: Set-Variable test -Option Constant -Value 100 and $test = 100 user avatar jsnoobie
  • 151
-2 votes 0 answers 18 views

how do i solve these on my laptop how to enable script running [duplicate]

enter image description here sanity : File C:\Users\sulaimon abraham\AppData\Roaming\npm\sanity.ps1 cannot be loaded. The file C:\Users\sulaimon abraham\AppData\Roaming\npm\sanity.ps1 is not digitally ... user avatar Ibrahim Sulaimon
  • 1
-2 votes 0 answers 17 views

Can I use Python or PowerShell to get the names of all my Amazon Music Playlists? [closed]

I want to regularly extract a list of the names of my Amazon Music playlists (not the songs in them). I've got beginner-middle skills in both Python and PowerShell, including Web API & JSON usage. ... user avatar dwids
  • 63
-1 votes 0 answers 17 views

I am looking for variable text in a file that follows "source=" and is before ";initial" [closed]

I have created and audit script that I can place on a server that has our software on it so as to automatically retrieve most of the information I need. The last piece is driving me crazy. I’m looking ... user avatar Mike E
  • 1
0 votes 0 answers 21 views

Screen sharing with powershell

i am trying to make a screen viewer. i have an C# server side that works good and i have C# client side that works good. this is my C# client side code: using System; using System.Collections.... user avatar Daniel
  • 11
2 votes 2 answers 65 views

What is the best way to check PowerShell Execution Policy in C#?

When you run Get-ExecutionPolicy in PowerShell, it gets the effective execution policy. I need to know the best way to get that information in C#. I don't need to know how to change it like many other ... user avatar Unknown
  • 135
0 votes 1 answer 25 views

.net error - are you missing an assembly reference?

I've created .net program using dotnet new console -o MyApp -f net6.0 command just as documented in I've modified the file: ... user avatar Ultra
  • 37
1 vote 1 answer 23 views

Formatting .CSV in Powershell

So I'm writing a powershell script to help sort data I have, but I need that data in a certain format. FN: ORG: Title Tel: Email: Example A Exam A Exa A EX A ... user avatar DylanC
  • 11
0 votes 2 answers 29 views

How would I disaply only the last two days of windows updates in powershell?

Okay, so I'm in the process of writing out a script, and I'm at a point where I want to count the number of updates installed in the last day or so. I'm using Get-CIMInstance because the get-wuhistory ... user avatar Wydra91
  • 13
0 votes 0 answers 8 views

Cannot remove .sonarqube folder on a Windows agent in a DevOps Server pipeline due to an invisible file

In our pipelines building .NET apps, we use SonarScanner for Azure DevOps version 4.23.1, using the MSBuild integration. Sometimes, the tasks leave some mess in the .sonarqube directory inside the ... user avatar Palec
  • 11.5k
1 vote 1 answer 22 views

Activate virtual environment from a python script

I am trying to create a python script for automating some of my personal stuff. In the script, I first want to activate my virtual environment and then do some other tasks, (API calls and processing ... user avatar Khan Asfi Reza
  • 509
0 votes 0 answers 10 views

Finding DOM elements with RelativeBy in Selenium 4 and Powershell

Riffing off of this question here: Finding elements with PowerShell and Selenium 4 It's pretty easy use Powershell with Selenium 4 to find elements on the page like this with By.Id: $driver.... user avatar cvocvo
  • 1,515
0 votes 2 answers 9 views

Powershell Curl alternative with Multiform data in Body getting 400 BAD request

I have a curl command that i translated in to powershell but i get Below error ErrorMessage The remote server returned an error: (400) Bad Request. CanTimeout : True ReadTimeout : -1 WriteTimeout ... user avatar wehelpdox
  • 141
0 votes 1 answer 13 views

AD: How can I modify the nTSecurityDescriptor/DACL/ACL from DirectoryServices.Protocols.LdapConnection?

I have tried with ModifyRequest but unfortunately I was not able to find the proper way. I see it is very straightforward to do with DirectoryEntry but I must use the raw LdapConnection since it is ... user avatar AndrewNo
  • 17

15 30 50 per page123456933

You Might Also Like