No announcements
Found 1648845 threads
-
1 Votes
Powershell Foreach question not working as expected
$uri = 'https://rust.facepunch.com/rss/blog' $data = Invoke-RestMethod $uri #$data | Select ...Answered | 6 Replies | 566 Views | Created by Guardian911 - Tuesday, November 7, 2017 9:20 PM | Last reply by jrv - Wednesday, November 8, 2017 4:25 AM -
0 Votes
PowerShell -replace not working as expected
Maybe you will use: [string]::Join(' ', $_.Harddisks) instead of : $_.Harddisks | foreach { $_.CapacityKb } Join methods ...Answered | 14 Replies | 28131 Views | Created by slartybardfast - Thursday, March 12, 2009 10:12 AM | Last reply by Grégory Schiro - Sunday, March 15, 2009 2:34 PM -
10 Votes
Powershell: Foreach-Object vs. foreach
While these two statements work as expected with foreach loop, they don't have any significance when used inside Foreach-Object.Answered | 4 Replies | 69795 Views | Created by Bigteddy - Sunday, August 21, 2011 6:59 AM | Last reply by pamarths - Tuesday, March 11, 2014 1:20 PM -
0 Votes
Powershell command question - sanity check foreach-object
This is not necessarily a bad thing, just pointing this out, as it was not necessarily expected.Answered | 5 Replies | 5029 Views | Created by Troy12n - Wednesday, April 20, 2011 11:56 AM | Last reply by jrich - Friday, April 22, 2011 11:37 AM -
0 Votes
foreach not working
Hello Mike, thanks that worked!Answered | 2 Replies | 1688 Views | Created by Oekeloen - Monday, August 29, 2016 1:14 PM | Last reply by Oekeloen - Wednesday, August 31, 2016 9:47 AM -
2 Votes
How does foreach loop work?
I assumed that $config_files was naturally an array, but it appears that formally casting it corrects the underlying Powershell 'bug'.Answered | 5 Replies | 2606 Views | Created by JerryHone - Thursday, September 13, 2012 11:07 AM | Last reply by mjolinor - Friday, September 14, 2012 11:03 AM -
0 Votes
Output from powershell not ordered as expected
This works perfectly for me, many thanks for all your answers and explanations.Answered | 12 Replies | 1144 Views | Created by Trainedchimp - Wednesday, November 27, 2019 3:57 PM | Last reply by Trainedchimp - Thursday, November 28, 2019 11:19 AM -
0 Votes
PowerShell Question
Hi Mervyn, The link provided above outlines use of psexec.exe and powershell and provides the following example.Answered | 6 Replies | 6682 Views | Created by Emirdag - Thursday, July 9, 2009 2:42 PM | Last reply by worldOfWonders - Wednesday, October 28, 2009 4:18 AM -
0 Votes
Force PowerShell ForEach loop to run sequentially
PS7 has a "foreach-object -parallel" version It will not work the same as Windows PowerShell.Answered | 27 Replies | 2793 Views | Created by Shawn 'Cmdr' Keene - Wednesday, September 30, 2020 10:38 PM | Last reply by jrv - Wednesday, October 7, 2020 9:28 PM -
3 Votes
Powershell Backgroung job not working as expected
didnt work ... the job is running but no file is created ...Answered | 6 Replies | 4530 Views | Created by TonQ - Wednesday, October 5, 2011 9:27 AM | Last reply by jrv - Thursday, October 6, 2011 3:43 PM -
2 Votes
Powershell - loop question
Why all of the code when we have PowerShell.Answered | 13 Replies | 2272 Views | Created by bflagg - Wednesday, December 11, 2019 5:12 AM | Last reply by bflagg - Wednesday, February 12, 2020 4:08 AM -
0 Votes
Foreach
Powershell-Admin, The way a foreach loop works is that you are working on 1 ...Answered | 9 Replies | 555 Views | Created by Powershell-Admin - Saturday, October 1, 2016 6:30 PM | Last reply by Joshua Wortz - Monday, October 3, 2016 2:49 AM -
1 Votes
My powershell script not working as I would expect
Guys I finally worked it out.Answered | 12 Replies | 1161 Views | Created by The Hawk1 - Monday, August 19, 2013 1:27 PM | Last reply by The Hawk1 - Monday, August 19, 2013 3:12 PM -
0 Votes
Foreach - add notation to foreach loop, do i need a nested foreach
Thanks Jrv, but it was more a powershell issue of just adding a comment after a foreach loop, the ticket is now resolved.Answered | 16 Replies | 1336 Views | Created by ritz5 - Tuesday, August 25, 2015 6:30 PM | Last reply by ritz5 - Wednesday, March 15, 2017 4:22 PM -
2 Votes
Powershell - Write-output on same row as variable in foreach loop?
In the initial code by user -ExpandProperty was not there so the result was not as expected(If you have saw the script in question).Answered | 23 Replies | 8183 Views | Created by Hennay - Tuesday, July 2, 2019 1:23 PM | Last reply by jrv - Thursday, July 4, 2019 9:29 AM -
0 Votes
Powershell Scheduled task only performing 2 foreach
Completely different script concept, but I have a foreach loop in a script that needs to be run by a scheduled task.Answered | 3 Replies | 1068 Views | Created by PaulT15 - Wednesday, July 29, 2015 7:17 PM | Last reply by jrv - Wednesday, November 25, 2015 4:44 PM -
2 Votes
Powershell Question
How do i specify the data columns from the csv and tell powershell to use that column i need to specify?Answered | 6 Replies | 1429 Views | Created by Andres Oliver - Monday, July 1, 2013 3:03 PM | Last reply by jrv - Monday, July 1, 2013 5:09 PM -
0 Votes
Foreach loop container question
When I move a foreach loop container onto the control flow area from the Toolbox and do Edit - Collection - Enumerator I do not see a selection for Foreach File Enumerator.Answered | 1 Replies | 3640 Views | Created by davebo5256 - Monday, June 27, 2011 2:41 PM | Last reply by ArthurZ - Monday, June 27, 2011 2:59 PM -
3 Votes
Export-CSV not working as expected
$computers = get-content c:\temp\systems.txt | ForEach{$_.Trim()} Powershell will include any spaces in the string and can ...Answered | 6 Replies | 5118 Views | Created by zperryz - Wednesday, November 7, 2012 12:58 AM | Last reply by Alex K. Angelopoulos - Friday, November 9, 2012 3:26 AM -
0 Votes
Powershell: variable Where-Object not working as expected
But not working.Answered | 9 Replies | 4640 Views | Created by Manfred Gold - Tuesday, April 11, 2017 2:46 PM | Last reply by Bill_Stewart - Wednesday, April 12, 2017 7:53 PM - Items 1 to 20 of 1648845 Next ›
No announcements