Category "powershell"

Powershell: Script that was working now errors giving Get-ADUser : The server was unable to process the request due to an internal error

I had a script that was working fine. Went away for a few hours and came back and now it errors. Error Get-ADUser : The server was unable to process the request

Can we execute az PowerShell module commands inside of a runspace in a .net console app deployed as a webjob on Azure app service?

I've a webjob running in an azure app service that uses runspace to execute azure powershell module commands. Locally it's working fine because I can install az

Adding a Write Progress bar to a script Powershell

I'm actually writing a powershell script that sort pictures and videos by dates. The script works fine but i would like to add a progress bar, and i don't know

Powershell Sort-Object PSCustomObject with Object[] as value

I am using RestAPI access to azure. I am getting a list of changesets for a build ID. I would like to sort the object type with increasing Changeset number. The

Dataflow command doesn't excute

I'm trying to create a dataflow pipeline but I get this error in my powershell console Traceback (most recent call last): File "load_pole_emploi.py", line 107,

How to run a bash script on wsl with powershell?

On my current directory on Windows, I have the following script file simple_script.sh: #!/bin/bash echo "hi from simple script" I wish to run this script on ws

Extracting multiple values from text file

New to PowerShell and trying hard to get something out of the text file. Here is sample data: RDFC1111 Z MED 22 23:18:39 MPHSFHFKD OF THE AAAOAAAY GAAAAAA~ PAGE

Powershell_how to get a section id of HTML DOM?

I'm new to Powershell. I'm curretly trying to get the url of both "a href" and "img src" which are defined in specific section id(id="YY"). The code below is th

I want my batch file to execute my jar file in PowerShell and not cmd?

I made a .jar file for my little Programm that works in the Terminal. I also made a bat file to open my jar file automatically however it opens my jar file in t

use powershell to print a list of files inside a folder and its subfolders

i need to print all the files included in a folder and its subfolders. i tried with this command Get-ChildItem -Path 'c:\mypath\' -File -Recurse | Out-File -Fil

Powershell: create directory using filenames without extension and move files to new directory

I'm trying to move files (a bunch of files in a subdirectory), create a subfolder if it doesn't exist and then move the files to the subfolder $files = Get-Chil

Powershell replace values in target.json with values from source.json

I have a big target json file (parameters_general.json) where all common settings for a deployment are set. For each tier I have another json file (ex: paramete

New-localuser with joined string password

What is going wrong with this: $pass= "kissa"+"koira" $pw= ConvertTo-SecureString $pass -AsPlainText -Force #Create local user New-LocalUser -Name $username -P

Retrieving file information of specific date using powershell

I have a base folder as: D:\St\Retail\AMS\AMS\FTP-FromClient\AMS It contains various folders of dates: 2022-04-01 2022-04-02 ... ... 2022-02-02 2021-05-05 201

How can I combine these 2 functions to add a network profile using a 3rd parameter?

[After playing around with it for a few hours I did find a solution] I have 2 different functions I have written to add a network profile. The first is to add a

Powershell Formatting for a String

I have a string that I want to insert dynamically a variable. Ex; $tag = '{"number" = "5", "application" = "test","color" = "blue", "class" = "Java"}' I want t

PowerShell Get-Team Display Name from GroupID

Good afternoon all, Would greatly appreciate your help and perhaps a little of your patience as i am very very new to Powershell. I am trying to export a .csv l

sendkeys doesn't work inside github API (command line)

I'm trying to automate the creating of remote repos using powershell and gh repo create and the first thing that happens after running that command is an option

Get SCCM Collection Info from List of Servers

I need to get SCCM collection info form a list of 150 servers to figure out what deployment collections each device belongs to. I can easily list all devices fr

Pester for Connect-NetScaler

Hey guys having trouble writing pester for this function. The function is down below. Here is a link of the code if you prefer looking on here. https://www.powe