Category "powershell"

PowerShell Team Owners and Team names from a List of GroupIDs

Good afternoon all, Hoping someone can help with a broad problem I'm having with efficiency in the follow PowerShell query. In brief, the idea behind the follow

Create NSG ARM Template from CSV via Azure PowerShell

I am trying to automate my NSG creation, as well as NSG remediation for Azure via DevOps pipelines. Therefore, I wrote a PowerShell script that creates an ARM T

Importing a custom module in Powershell

I'm trying to figure out how I can import custom modules into my powershell script that I've created. Initially, I created device information class psm1 module:

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