Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

I have a file with below content, i wanted to convert all the build jobs into a different format like in expected output. parallel ( { build( "job2", parameter3: value3, parameter4: ...
Hemanth's user avatar
  • 51
0 votes
1 answer
718 views

I am pretty new to PowerShell scripting so I wanted to write a script that helps our apprentices in setting up new laptops for our customers. This script should rename the computer, then restart it ...
Slime's user avatar
  • 1
0 votes
0 answers
45 views

I've the following code to execute parallels command in powershell workflow Test-Workflow { $Sites = "Param1", "Param2", "Param3" ForEach -Parallel ($...
Marc Cals's user avatar
  • 3,009
0 votes
1 answer
501 views

I tried something like this and it starts one after the other function start-parallel { workflow work { start-process $exe1 -wait start-process $exe2 -wait } work }
user310291's user avatar
  • 38.6k
0 votes
0 answers
695 views

I have issues publishing a PowerShell workflow. Most of the script I am using is run in sequence, including the first for loop. But I would like to final for loop to execute in parallel. The code is ...
user13696433's user avatar
0 votes
1 answer
325 views

I wrote a script to export rows from a SQL DB, encrypt them using PGP, then transfer them using POSH-SSH v2.3.0. It all works fine, until I put it in a PowerShell WorkFlow to run multiple at a time. ...
alexander7567's user avatar
0 votes
1 answer
281 views

I have written the following runbook workflow, but from time to time I see the error when it try's to start or stop a VM: Start-AzVM : Your Azure credentials have not been set up or have expired, ...
Jeffrey's user avatar
  • 2,159
0 votes
2 answers
1k views

I have a powershell workflow script as below: workflow mytest{ param($param1,$param2,$param3) //code } mytest $param1,$param2,$param3 Issue here is all the three params were received as ...
Sankaranand 's user avatar
0 votes
1 answer
382 views

I'm trying to run two Invoke-Sqlcmd in parallel and then wait all the results. $server1 = '...' $server2 = '...' workflow work { parallel { $r1 = Invoke-Sqlcmd -ServerInstance $server1 'select ...
ca9163d9's user avatar
  • 29.6k
0 votes
1 answer
185 views

I have several Workflow scripts defined. I want to write a master script to reference the dependent scripts. I am expecting there is some kind of Import or Include statement to reference the dependent ...
jlo-gmail's user avatar
  • 5,096
0 votes
1 answer
2k views

I have written a script to get the offline cluster resources using foreach syntax and it is working fine. But I need to get the cluster offline resources for 50 clusters and I have tried foreach -...
Chandra Sekhar's user avatar
0 votes
1 answer
3k views

This question was asked a few times before but I could not find a solution to my scenario in any of them. Basically I need the script to continue after it reboots if needed. It will check a few ...
Eran Mor's user avatar
  • 105
1 vote
1 answer
383 views

I get list of endpoints as arguments to my script, I want to send http request to all of them, but I don't want to do it in sequence, but rather simultaneously. I found that there is something like ...
Yoda's user avatar
  • 18.2k
0 votes
1 answer
690 views

This is my script: workflow Run-RemoteScript { Param( [Parameter(Mandatory,Position=0)][string[]]$Targets, [Parameter(Mandatory,Position=1)][PSCredential]$Credentials, [...
Tobias KKS's user avatar
0 votes
1 answer
3k views

Can anyone help with this problem? I am referring to a example from the internet for executing T-SQL statements in parallel. https://www.mssqltips.com/sqlservertip/3539/complete-common-sql-server-...
ADTJOB's user avatar
  • 85
1 vote
0 answers
263 views

When I call a workflow in another workflow's foreach -parallel, I get weird and inconsistent results. Here's some sample code: workflow test-workflow1 { Start-Sleep 2 "Stuff" } workflow test-...
LavaHot's user avatar
  • 381
0 votes
1 answer
546 views

I have an Azure Automation Powershell Workflow: workflow wf { param( [parameter(Mandatory=$True)] [object] $p ) inlinescript { # ... } } I am testing it using the Test pane and ...
Jonas Stawski's user avatar
1 vote
1 answer
2k views

Given the following Script, how can I return two variables to the main code? I have tried the return command but show an error. Please find the code and error message below. Code: workflow Test-...
Sagor Sen Golder's user avatar
0 votes
1 answer
190 views

When I run the following powershell workflow : Function Start-LocalRScript { Param([Parameter(ValueFromPipeline, Mandatory)]$Name) $ScriptPath = "C:\Exploration.RScripts" $RScriptExePath = "C:\...
Mario's user avatar
  • 313
0 votes
2 answers
1k views

I am writing a PowerShell script to display the status of free space and CPU, below is snippet: function Get_FreeSpace ($authType, $comp) { $freespace = Invoke-Command -ScriptBlock { Get-...
sunny's user avatar
  • 71
1 vote
0 answers
369 views

I'm trying to use Azure runbooks to start virtual machines with a specified tag. I use powershell workflow so i can start them i parallel. The code below works, but it always have problem starting ...
Moddaman's user avatar
  • 2,868
1 vote
3 answers
4k views

Hi there I'm new to running powershell scripts in azure and looking for the best guidance ? I have created a powershell script to locate running machines in a resource group and output to a text file,...
BenAhm's user avatar
  • 161
3 votes
3 answers
842 views

I have a PowerShell script whose purpose is to get a list of files then do some work on each file. The list of files is generated by a recursive function like this: function Recurse($path) { .. ...
Artog's user avatar
  • 1,132
6 votes
2 answers
10k views

Does anyone know how to hide output from command Select-AzureRmSubscription inside azure workbook which runs as powershell workflow Thanks
Rafal's user avatar
  • 257
5 votes
2 answers
5k views

The throttlelimit parameter of foreach -parallel can control how many processes are used when executing the script. But I can't have more than 5 processes even if I set throttlelimit greater than 5. ...
Haoshu's user avatar
  • 934