Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
CLAM DOWN
Feb 13, 2007




To be clear, I'm most annoyed at this API that randomly decides to put the most critical returned ID value in the header rather than the JSON.

Thanks for the tips all.

Adbot
ADBOT LOVES YOU

Potato Salad
Oct 23, 2014

nobody cares


Sounds like it should put it in both

kumba
Nov 8, 2003

I posted my food for USPOL Thanksgiving!

enjoy the ride

Lipstick Apathy
stupid newbie question:

I have a summarization process I run on a monthly basis that combines data from a poo poo load of disparate spreadsheets (67 of them to be exact). Part of this summarization process relies on Excel's INDIRECT() function in the main workbook building strings of filepaths based on other criteria yadda yadda. What this means is that for my summarization to work, I have to physically open every single workbook I want to pull data from. I hate doing this manually and would rather just have something do this for me while I walk away for a minute.

I wrote a script to open all the proper workbooks containing the string that I need, and that part works just fine. The problem I'm running into is having 68 spreadsheets open all at once crashes my system. I'd like to add a pause about halfway through. How do I do that? I found a way to pause in between, but the way variable increments work in powershell is apparently not what I would have thought and the pause fires off in between EVERY workbook instead of at the increment I wanted. For example:

code:
$string = "*string containing wildcards*.xlsm"
$array = Get-ChildItem -Path "\\my\file\path\goeshere" -Include $string -Recurse
for($i=0; $i -lt $array.Length; $i++)
    { 
      $item = $array[$i]
      Invoke-Item $item 
      if($i = 30)
        {
        read-host "PRESS ENTER TO CONTINUE..."
        }
    }
I would have thought that this would open up the first 30 (31 i guess technically) workbooks, then pop up a message window that I would then have to hit enter or click OK to proceed forward, but instead this window opens between every workbook. That doesn't make sense to me but this is my 2nd time using PS ever so I'm sure I'm doing something stupid. I tried using just foreach($item in $array) as well but the same thing happened.

Happiness Commando
Feb 1, 2002
$$ joy at gunpoint $$

Pay no attention to the man behind the curtain

The Fool
Oct 16, 2003


Powershell comparisons use argument flags.

Your comparison should be
code:
if ($i -eq 30) {
    read-host "PRESS ENTER TO CONTINUE..."
}

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
[edit] I'm dumb

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
Is the problem all 68 workbooks opening at the same time, or having all 68 workbooks open at the same time? If it's just that launching them all at once causes your system to freak out, I'd add start-sleep -seconds 5 after every invoke item. This will cause your script to wait 5 seconds between calls of invoke-item.

Also, powershell is way better at iterating than the way you're doing it. This doesn't really change how your script runs but it's much better powershell:
code:
$string = "*string containing wildcards*.xlsm"
$workbooks = Get-ChildItem -Path "\\my\file\path\goeshere" -Include $string -Recurse
foreach ($workbook in $workbooks)
    { 
      Invoke-Item $workbook
      start-sleep -seconds 5
    }
I guess you do lose your iterator i but I suspect you don't actually need that.

FISHMANPET fucked around with this message at 19:18 on Aug 24, 2018

The Fool
Oct 16, 2003


code:
$string = "*string containing wildcards*.xlsm"
$workbooks = Get-ChildItem -Path "\\my\file\path\goeshere" -Include $string -Recurse

foreach ($workbook in $workbooks)
{ 
    Invoke-Item $workbook
    start-sleep -seconds 5

    if (($workbooks.IndexOf($workbook) % 30) -eq 0) {
        Read-Host "Pausing after 30 workbooks!"
    }
}
Best of both worlds?

kumba
Nov 8, 2003

I posted my food for USPOL Thanksgiving!

enjoy the ride

Lipstick Apathy
see, I told you it was something stupid. thanks yall


FISHMANPET posted:

Is the problem all 68 workbooks opening at the same time, or having all 68 workbooks open at the same time? If it's just that launching them all at once causes your system to freak out, I'd add start-sleep -seconds 5 after every invoke item. This will cause your script to wait 5 seconds between calls of invoke-item.

Also, powershell is way better at iterating than the way you're doing it. This doesn't really change how your script runs but it's much better powershell:
code:
$string = "*string containing wildcards*.xlsm"
$workbooks = Get-ChildItem -Path "\\my\file\path\goeshere" -Include $string -Recurse
foreach ($workbook in $workbooks)
    { 
      Invoke-Item $workbook
      start-sleep -seconds 5
    }
I guess you do lose your iterator i but I suspect you don't actually need that.

yeah i tried using that method first and then figured i'd go the old for loop route to see if it worked any differently, when the problem was just the comparison I was using instead. definitely going back to the foreach method

thanks again everyone

e: after iterating a few times I could not get if(($array.IndexOf($item)%20) -eq 0) part to work for some reason, that just refused to trigger. instead i used a foreach loop and just incremented a variable anyway and used that instead. ended up with

code:
$string = "*string containing wildcards*.xlsm"
$array = Get-ChildItem -Path "\\my\file\path\goeshere" -Include $string -Recurse | Sort-Object -Property name
$i = 0
foreach ($item in $array)
    { 
      Invoke-Item $item 
      start-sleep -seconds 3
      $i++
      if(($i % 20) -eq 0)
        {
        read-host "Pausing after 20 workbooks, press enter to continue!"
        }
    }
which works perfect, and as an added bonus after i discovered the sort-object cmdlet they now actually open in the order i want them to. hooray automation

thanks again goons

kumba fucked around with this message at 21:36 on Aug 24, 2018

PBS
Sep 21, 2015

kumba posted:

see, I told you it was something stupid. thanks yall


yeah i tried using that method first and then figured i'd go the old for loop route to see if it worked any differently, when the problem was just the comparison I was using instead. definitely going back to the foreach method

thanks again everyone

e: after iterating a few times I could not get if(($array.IndexOf($item)%20) -eq 0) part to work for some reason, that just refused to trigger. instead i used a foreach loop and just incremented a variable anyway and used that instead. ended up with

which works perfect, and as an added bonus after i discovered the sort-object cmdlet they now actually open in the order i want them to. hooray automation

thanks again goons

Out of curiosity, what's your full workflow here?

Open 20 workbooks > Run processing against those 20 workbooks while they're open > Repeat?

nielsm
Jun 1, 2009



He has one "master" workbook that references data in the other workbooks via the INDIRECT function, and to let those formulas recalculate with newest data, he has to open those workbooks too.

PBS
Sep 21, 2015

nielsm posted:

He has one "master" workbook that references data in the other workbooks via the INDIRECT function, and to let those formulas recalculate with newest data, he has to open those workbooks too.

What's the purpose of leaving them open then?

nielsm
Jun 1, 2009



PBS posted:

What's the purpose of leaving them open then?

I'm guessing you need to click the "recalculate" button in Excel to actually make it do the update.

kumba
Nov 8, 2003

I posted my food for USPOL Thanksgiving!

enjoy the ride

Lipstick Apathy

PBS posted:

What's the purpose of leaving them open then?

If you close the workbook, the formulas revert back to a #REF error because they're no longer open and accessible. Unfortunately, my process involves me copy + paste values over the formulas so the results stick. Hence, open 20 workbooks, pause while I copy + paste values, continue through the rest of them :v:

We're getting a permanent actual solution to this problem in a few months, this is just a stop gap that's part of a monthly reporting process until the time our infrastructure teams get everything in place

e: for context, I'm a supervisor of an analytics team in a call center that does agent performance grades, and this is part of a monthly summarization of those graded calls

PBS
Sep 21, 2015

kumba posted:

If you close the workbook, the formulas revert back to a #REF error because they're no longer open and accessible. Unfortunately, my process involves me copy + paste values over the formulas so the results stick. Hence, open 20 workbooks, pause while I copy + paste values, continue through the rest of them :v:

We're getting a permanent actual solution to this problem in a few months, this is just a stop gap that's part of a monthly reporting process until the time our infrastructure teams get everything in place

e: for context, I'm a supervisor of an analytics team in a call center that does agent performance grades, and this is part of a monthly summarization of those graded calls

Makes sense, you could also just automate excel too and then iterate over each workbook individually.

https://blogs.technet.microsoft.com/heyscriptingguy/2006/09/08/how-can-i-use-windows-powershell-to-automate-microsoft-excel/

Glad to hear you're correcting the process, it's not a very modern workflow. (Even if you automate it)

thebigcow
Jan 3, 2001

Bully!
If the infrastructure team is full of lies and you need to expand on your current nightmare, check out the PSExcel module

CLAM DOWN
Feb 13, 2007




If any of you work with VSTS with your scripts, this page is changing my life today: https://blogs.msdn.microsoft.com/premier_developer/2016/04/13/tips-for-writing-powershell-scripts-to-use-in-build-and-release-tasks/

I had no idea you could do poo poo like this:

code:
Write-Host "##vso[task.logissue type=error;] PowerShell Error Test"
I've been trying to figure out how to cleanly trigger warnings and errors in VSTS to potentially fail a build or release step. There's always ways to pass variables back up to VSTS!

Wicaeed
Feb 8, 2005
Has anyone run into issues with VSCode not properly honoring PSBreakpoints while debugging Powershell?

I'm used to ISE, in that I add a breakpoint & ISE always honors it, however in VSC I add a breakpoint on something even as simple as a comment and VSC just blows right past it sometimes.

The heck?

PBS
Sep 21, 2015
You can breakpoint comments?

The Fool
Oct 16, 2003


Wicaeed posted:

Has anyone run into issues with VSCode not properly honoring PSBreakpoints while debugging Powershell?

I'm used to ISE, in that I add a breakpoint & ISE always honors it, however in VSC I add a breakpoint on something even as simple as a comment and VSC just blows right past it sometimes.

The heck?

IIRC, VSCode breakpoints only trigger on executed code. As a result, you cannot place breakpoints on empty lines or in comments and expect them to trigger.

Also, I have no idea how this compares to ISE, but if you put a breakpoint on a line in VSCode, it will trigger before the line is executed.

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.
Hi all. Looking for a little help configuring a classroom set of Lenovo Thinkpads running Windows 10.

The computers make a system beep when certain three-key combinations are depressed simultaneously. This seems to be a common enough problem, as I've encountered a number of fixes online. From one link,

website posted:

Go to Device Manager and “Show Hidden Devices”. Under “Non-Plug and Play Drivers” you’ll see an item named “Beep”. Disable that and the “random beep” disappears. Once done, of course, you can hide the hidden devices again.

Good enough, but from the same site:

website posted:

Windows 8 [and as it seems, Windows 10] no long exposes the “Non-Plug and Play Drivers” as part of the Device Manager, but there is another way to disable the “Beep ” driver/service. In fact, this likely works in Windows 7, Vista, and XP, but I can only confirm it’s use in Windows 8:

To stop the Beep sound for one session, open Command Prompt as Administrator and type:

sc stop Beep

To disable the Beep sound across reboots, open Command Prompt as Administrator and type:

sc config Beep start=disabled

To re-enable the Beep sound across reboots, open Command Prompt as Administrator and type:

sc config Beep start=system

I do not have admin rights on these machines. The teacher in the room has previously submitted a ticket on this issues and been rejected.

A few questions:

- Can I expect the above solution using sc.exe to persist for different users of the same machine?
- I'm no PS expert, but does 'Set-Service -Name Beep -StartupType Disabled' look correct for disabling this beep? (but may require restart?) And would that persist for new users as well?
- I'm no Windows networking expert, but can a one-liner be composed to hit all of these computers at once? To the effect of:

code:
Set-Service -Name Beep -StartupType Disabled -ComputerName 'computer1', 'computer2', 'computer3'
- If such a one-liner were executed while the computers themselves were shut down, would the commands be queued someplace magical and eventually reach their targets?

Potato Salad
Oct 23, 2014

nobody cares


How do you intend to authenticate as an administrator to Windows Remote Management on these machines?

Additionally, do you know whether dns in your environment will actually let you resolve those machine names?

Lastly, for asynchronous execution with retry/wait options, look at submitting these as powershell "jobs"

Potato Salad fucked around with this message at 04:03 on Sep 12, 2018

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Potato Salad posted:

How do you intend to authenticate as an administrator to Windows Remote Management on these machines?

Oops. My hope is to hand off a one-liner to the network administrators so that it'll be an easier thing for them to decide to do. "System beeps happening sometimes" is a pretty vague ticket and sounds like it could be a rabbit hole. I'd like to gift-wrap it.

Potato Salad posted:

Additionally, do you know whether dns in your environment will actually let you resolve those machine names?

No clue off hand. Is this easy to check without admin rights? If so I could have a look tomorrow.

e: presumably something like 'ping computer1' would tell me what I need to know there?

Potato Salad posted:

Lastly, for asynchronous execution with retry/wait options, look at submitting these as powershell "jobs"

Will look into it, thanks.

Newf fucked around with this message at 04:47 on Sep 12, 2018

Potato Salad
Oct 23, 2014

nobody cares


Got it, that's much more clear. So...less Shadow IT :drac: and more "Hey this is p easy"

Next time you're in, do the following to determine whether you're in a domain environment (you almost certainly are)

Right mouse click on the Computer icon (in Windows 10, you'll reliably find This PC in a file browser's left column)

Select Properties

Look under the Computer name, domain



In cmd, from another computer, run
nslookup thefullnameofthefirstcomputer

For example,
nslookup rm304-dell8080.ad.happyschool.co.uk

That'll tell you whether computers (1) are in a domain (2) have suitable DNS records

Potato Salad fucked around with this message at 05:16 on Sep 12, 2018

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Potato Salad posted:

Got it, that's much more clear. So...less Shadow IT :drac: and more "Hey this is p easy"

Next time you're in, do the following to determine whether you're in a domain environment (you almost certainly are)

Right mouse click on the Computer icon (in Windows 10, you'll reliably find This PC in a file browser's left column)

Select Properties

Look under the Computer name, domain



In cmd, from another computer, run
nslookup thefullnameofthefirstcomputer

For example,
nslookup rm304-dell8080.ad.happyschool.co.uk

That'll tell you whether computers (1) are in a domain (2) have suitable DNS records

Hey, thanks. Will check on this tomorrow and poke back here with updates. Further comments welcome :)

Newf fucked around with this message at 05:37 on Sep 12, 2018

nielsm
Jun 1, 2009



Does anyone know of a PS module or method for reading/querying/updating SharePoint lists? The idea being to write tools in PS that fetch some data and store in a SharePoint list for a web-based lookup tool to use.

Potato Salad
Oct 23, 2014

nobody cares


server or o365

nielsm
Jun 1, 2009



SharePoint Server (2010 because upgrading is unnecessary busywork)

my cat is norris
Mar 11, 2010

#onecallcat

Hi, friends. I'm looking for some help with Azure AD. I'm trying to mass-remove Yammer licenses from everyone in my environment, but I'm having a dickens of a time putting together a functional PowerShell script. Most guides I've found online refers to the MSOLService commands that have been replaced with AzureAD commands (I think?). A straight update of scripts doesn't seem to work for me, though.

Here's what I've learned so far:

I can get a single AzureAD account with Get-AzureADUser.

I can get a list of that user's assigned licenses and plans.

I can get a list of sub-SKUs for the Enterprise Pack license, so I know the SKUs for the products I want to disable (Yammer).

I can assign a license (ENTERPRISEPACK) while disabling the desired sub-SKU for a single user.

My Script posted:

$User = Get-AzureADUser -SearchString <upn>

Set-AzureADUser -ObjectId $User.ObjectId

$SkuFeaturesToDisable = @("YAMMER_ENTERPRISE")

$StandardLicense = Get-AzureADSubscribedSku | Where {$_.SkuId -eq "6fd2c87f-b296-42f0-b197-1e91e994b900"}

$SkuFeaturesToRemove = $StandardLicense.ServicePlans | ForEach-Object { $_ | Where {$_.ServicePlanName -in $SkuFeaturesToDisable }}

$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense

$License.SkuId = $StandardLicense.SkuId

$License.DisabledPlans = $SkuFeaturesToRemove.ServicePlanId

$LicensesToAssign = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses

$LicensesToAssign.AddLicenses = $License

Set-AzureADUserLicense -ObjectId $User.ObjectId -AssignedLicenses $LicensesToAssign

What I can't figure out is a) how to generate a list of all users who have the ENTERPRISEPACK license enabled and b) how to apply the above Yammer removal to those licensed users only.

Any help appreciated! :shobon:

my cat is norris fucked around with this message at 20:57 on Sep 12, 2018

The Fool
Oct 16, 2003


nielsm posted:

Does anyone know of a PS module or method for reading/querying/updating SharePoint lists? The idea being to write tools in PS that fetch some data and store in a SharePoint list for a web-based lookup tool to use.

Use the CSOM

https://social.technet.microsoft.com/wiki/contents/articles/29518.csom-sharepoint-powershell-reference-and-example-codes.aspx

The Fool
Oct 16, 2003


my cat is norris posted:

Hi, friends. I'm looking for some help with Azure AD. I'm trying to mass-remove Yammer licenses from everyone in my environment, but I'm having a dickens of a time putting together a functional PowerShell script. Most guides I've found online refers to the MSOLService commands that have been replaced with AzureAD commands (I think?). A straight update of scripts doesn't seem to work for me, though.

Here's what I've learned so far:

I can get a single AzureAD account with Get-AzureADUser.

I can get a list of that user's assigned licenses and plans.

I can get a list of sub-SKUs for the Enterprise Pack license, so I know the SKUs for the products I want to disable (Yammer).

I can assign a license (ENTERPRISEPACK) while disabling the desired sub-SKU for a single user.


What I can't figure out is a) how to generate a list of all users who have the ENTERPRISEPACK license enabled and b) how to apply the above Yammer removal to those licensed users only.

Any help appreciated! :shobon:

This one-liner should get you a list of everyone with ENTERPRISEPACK.

code:
# Get all azure ad members with specific skuid in AssignedLicenses property
$EnterprisePackUsers = get-azureaduser -All $true -Filter "UserType eq 'Member'" | Where-Object { $_.AssignedLicenses.SKUID -eq "6fd2c87f-b296-42f0-b197-1e91e994b900" }
From there, I would wrap your code to disable Yammer in a ForEach.
code:
# license object generation goes here

# for each objectid of $EnterprisePackUsers, set the generated license object
ForEach ($AzureADUserObjectId in ($EnterprisePackUsers.ObjectId)) {
    Set-AzureADUserLicense -ObjectId $AzureADUserObjectId -AssignedLicenses $LicensesToAssign
}

my cat is norris
Mar 11, 2010

#onecallcat


Thank you!! This is exactly what my brain couldn't piece together today.

slartibartfast
Nov 13, 2002
:toot:

nielsm posted:

Does anyone know of a PS module or method for reading/querying/updating SharePoint lists? The idea being to write tools in PS that fetch some data and store in a SharePoint list for a web-based lookup tool to use.

Take a look at SPReplicator.

Potato Salad
Oct 23, 2014

nobody cares


The Fool posted:

This one-liner should get you a list of everyone with ENTERPRISEPACK.

code:
# Get all azure ad members with specific skuid in AssignedLicenses property
$EnterprisePackUsers = get-azureaduser -All $true -Filter "UserType eq 'Member'" | Where-Object { $_.AssignedLicenses.SKUID -eq "6fd2c87f-b296-42f0-b197-1e91e994b900" }
From there, I would wrap your code to disable Yammer in a ForEach.
code:
# license object generation goes here

# for each objectid of $EnterprisePackUsers, set the generated license object
ForEach ($AzureADUserObjectId in ($EnterprisePackUsers.ObjectId)) {
    Set-AzureADUserLicense -ObjectId $AzureADUserObjectId -AssignedLicenses $LicensesToAssign
}

:five:

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Potato Salad posted:


For example,
nslookup rm304-dell8080.ad.happyschool.co.uk

That'll tell you whether computers (1) are in a domain (2) have suitable DNS records

OK, so it seems that nslookup works from one computer to another:



This is presumably good news with respect to a scripted solution that hits all of the computers?

Potato Salad posted:

Lastly, for asynchronous execution with retry/wait options, look at submitting these as powershell "jobs"

Is the idea something along the lines of this? Apologies for the js, but I can't bang out any PS control flow quickly.

JavaScript code:
let computers = ['a', 'b', 'c'];

while (computers.length > 0) {
    setTimeout(100000, setBeeps()); // run the list every couple of minutes until all computers have been hit
}

function setBeeps() {
    computers.forEach((computer) => {
        if (isReachable(computer)) { // test-netconnection ${computer}
            stopBeep(computer); // stop-service -Name Beep -ComputerName ${computer}
            setBeeps(computer, 'startup = disabled'); // set-service -Name Beep -StartupType Disabled -ComputerName ${computer}
            computers.splice(computers.indexOf(computer), 1);
        }
    })
}
edit: and an admin can run something like:

start-job -FilePath noBeep.ps1

?

An attempt in PS:

code:
$computers = 'asof', 'awef'

while ($computers.Length -gt 0) {

    foreach ($computer in $computers) {
        if ((Test-Connection -ComputerName $computer)) {
            Set-Service -Name Beep -StartupType Disabled -ComputerName $computer
            $computers.Remove($computer)
        }
    }

    Start-Sleep 300 # try once every 5 minutes until all computers have been hit
}

Newf fucked around with this message at 04:38 on Sep 13, 2018

nielsm
Jun 1, 2009




Thanks, these look great.

PBS
Sep 21, 2015

Newf posted:

OK, so it seems that nslookup works from one computer to another:

This is presumably good news with respect to a scripted solution that hits all of the computers?

Is the idea something along the lines of this? Apologies for the js, but I can't bang out any PS control flow quickly.

edit: and an admin can run something like:

start-job -FilePath noBeep.ps1

An attempt in PS:

No, you would want to manage the jobs within the script itself and not set it to run infinitely in the job, but instead within the job wrapper. You could write to a file to store state or just keep updating a variable, either way really. Here's a basic framework for a "threaded" powershell script. It can be further simplified and some of what's in there is just for what I needed, but it should give you an idea.

PowerShell code:
#Max 'threads'
$maxJobs = 10
#Job cleanup, receives output and cleans up completed jobs. If you're having performance issues you can try lowering the value.
$cleanupInt = 100
$outputFile = ''

foreach ($blank in $blanks) {

	while ((Get-Job -State Running).Count -ge $maxJobs) {

		Write-Progress -Activity 'Running Lookups' -Status 'Waiting for threads to close' -CurrentOperation "$i threads created - $((Get-Job -State Running).Count) threads open" -PercentComplete ($i / $addresses.Count * 100)
		Start-Sleep -Milliseconds 100
	}

	$i++
	
	Start-Job -ArgumentList $blank -Name $blank -ScriptBlock {
		
		<<stuff in job>>
		
		}

	} | Out-Null

	
	if ($(Get-Job -State Completed).Count -ge $cleanupInt) {
		Write-Output 'Exporting Job Results'
		Get-Job -State Completed -HasMoreData $true | Receive-Job | Out-File -FilePath $outputFile -Append
		Write-Output 'Removing Completed Jobs'
		Get-Job -State Completed -HasMoreData $false | Remove-Job
		Write-Output 'Removing other non-running Jobs'
		Get-Job | ? {($_.State -ne 'Completed') -and ($_.State -ne 'Running')} | Remove-Job -Force
	}
}


$complete = Get-Date

while ((Get-Job -State Running).count -gt 0){
    
	Write-Progress  -Activity "Running Lookups" -Status "$((Get-Job -State Running).count) threads remaining" -CurrentOperation "Waiting for jobs to finish" -PercentComplete ((Get-Job -State Completed).count / (Get-Job).count * 100)
    If ((New-TimeSpan -Start $complete (Get-Date)).totalseconds -ge 60) {
	
		Write-Output "Killing remaining jobs"
		Get-Job -State Running | Remove-Job -Force
	}
	
    Start-Sleep -Seconds 1
}

Write-Output 'Exporting Job Results'
Get-Job -State Completed -HasMoreData $true | Receive-Job | Out-File -FilePath $outputFile -Append
Write-Output 'Removing Completed Jobs'
Get-Job -State Completed -HasMoreData $false | Remove-Job
Write-Output 'Removing other non-running Jobs'
Get-Job | ? {($_.State -ne 'Completed') -and ($_.State -ne 'Running')} | Remove-Job -Force

SnatchRabbit
Feb 23, 2006

by sebmojo
Does anyone have a fairly straightforward script to import an SSL cert and create a secure website with IIS? I need to deploy an oracle application that requires SSL.

Potato Salad
Oct 23, 2014

nobody cares


The Oracle application isn't using weblogic + Oracle security wallet?

Adbot
ADBOT LOVES YOU

SnatchRabbit
Feb 23, 2006

by sebmojo

Potato Salad posted:

The Oracle application isn't using weblogic + Oracle security wallet?

No, this is UPK, its just a standard install wizard and it asks you to pick a secure website from IIS (or disregard).

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply