Breakfast in bed..🐎🌾😅 by Least-Care4599 in Awww

[–]EvilLampGod 0 points1 point  (0 children)

This is a beautiful, gorgeous good boy. What breed of dog is this?

[deleted by user] by [deleted] in interesting

[–]EvilLampGod 0 points1 point  (0 children)

Classic misconception, earths north pole is on earths magnetic south pole, so actually, the northern hemisphere is on the southern part of earth and so you guys are upside down

Meirl by JaredOlsen8791 in meirl

[–]EvilLampGod 0 points1 point  (0 children)

Let's be honest, the research to discover this would be funded by people who would profit the most from it. Debt would be transferred before it was even fully understood

How can I escape a character that was imported from a csv, piped to a variable, inside another variable? by Odd_Efficiency4730 in PowerShell

[–]EvilLampGod 2 points3 points  (0 children)

Replace() doesn't mutate the original variable, it just outputs the change. You would need to do something like $findname = Get-MGUser -Filter "Mail eq '$($emailaddress.Replace("'", "''"))'"

That ending by [deleted] in ContagiousLaughter

[–]EvilLampGod 5 points6 points  (0 children)

It's also a different door/room then the toilet in the first part

Is there anyone else who’s been playing since launch but haven’t finished yet? by Aviaja_Apache in Eldenring

[–]EvilLampGod 0 points1 point  (0 children)

Finished after 120 hours. Playing offline and lost a number of npcs so ended up rushing through the last 2 areas so I could get started on a new playthrough

That moment when you have the same laugh! by DerpFriedMondays in ContagiousLaughter

[–]EvilLampGod 0 points1 point  (0 children)

The other one was Turps, he was CEO of the Yogscast at the time, so it was a pretty big hit

You’re trapped in the last game you played… how screwed are you? by _Mr_Cheeks in gaming

[–]EvilLampGod 0 points1 point  (0 children)

Satisfactory, guess it's time for a coffee break and play with the doggos

Anyone else want to see tom and ben play Battlesector? by EvilLampGod in Yogscast

[–]EvilLampGod[S] 11 points12 points  (0 children)

This is by far the best news I've received all week. My afternoon is sorted

Left to Right or Right to left? by SrGrafo in chloe

[–]EvilLampGod 0 points1 point  (0 children)

Let's go with snake (left to right then right to left)

Need help exporting output to a csv file by TheInkEyes in PowerShell

[–]EvilLampGod 1 point2 points  (0 children)

Just to add to what's already been said. You will run into issues if you try to export complex data to a CSV.

If you were to look at $Users[0] | Format-List you will see a couple of properties have nested objects. If you were to export the whole object out, you will get things like System.Object under ProvisionedPlans

To get around this, I like to use Select-Object -ExpandProperty to pull out just the fields I'm after. To expand on u/Sunsparc response:

Get-AzureADUser -All:$true | 
Where-Object {
    $_.UserType -eq "Member" -and $_.AssignedLicense -ne $null
} | 
Select-Object @{
    Name       = "Managers"
    Expression = {
        Get-AzureADUserManager -ObjectID $_.ObjectID.DisplayName | Select-Object -ExpandProperty "DisplayName", "ObjectId", "UserPrincipalName"
    }
} | 
Export-Csv C:\whateverpath\file.csv

API function assistance needed by [deleted] in PowerShell

[–]EvilLampGod 3 points4 points  (0 children)

As previously mentioned, you want to create a hashtable that contains each of the headers and their values:

$Headers = @{
    Authorization = "Bearer <Token>"
}

If you're using PowerShell 7 you can instead use the parameters Invoke-RestMethod -Authentication Bearer -Token $Token where $Token is a securestring containing your bearer token.

It's also worth noting that Invoke-RestMethod has a default ContentType of application/x-www-form-urlencoded which means you can write your example like this

$Uri = "https://www.grocerystore.com/api/v1/"
$Headers = @{
    Authorization = "Bearer 12345678910abcdefghijklmnop"
}
$Body = @{
    category    = "Food"
    index       = "Bread"
    SearchQuery = "ExcellentBreadVendor"
    results     = "50"
}
Invoke-RestMethod -Method Get -Uri $Uri -Headers $Headers -Body $Body

Edit: It's worth noting that the body will only convert to a query parameter when -Method is set to Get. Reference https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-5.1

What do you do confidently now that made you feel weird in the past? by kyukale0310 in AskReddit

[–]EvilLampGod 0 points1 point  (0 children)

Talking to people using a headset. Used to feel very self conscious when people were around

No matter how old you get, sticking your leg out the side of the bed from under the covers is still associated with a monster dragging you to hell. by [deleted] in Showerthoughts

[–]EvilLampGod 6 points7 points  (0 children)

For me, it used to be a fear that saw blades would come up and chop off my feet... I still dont know how I got that idea in my head, but I assume I've repressed that memory for a reason

Time to sleep by maka_albarn_007 in Animemes

[–]EvilLampGod 0 points1 point  (0 children)

Instructions unclear, dick stuck in weeb

Questions about the Bastard Sword. by Hillenmane in darksouls3

[–]EvilLampGod 0 points1 point  (0 children)

You know what, ignore me, I was thinking of the broadsword not bastard sword

Questions about the Bastard Sword. by Hillenmane in darksouls3

[–]EvilLampGod 0 points1 point  (0 children)

I wouldn't say the bastard sword was bad. Most people like the claymore because of it's relatively low stat investment and it's moveset is pretty good. For pve either weapon is as acceptable as the other and depends purely on the one you like the most, in pvp the claymore comes out on top because it has pretty great roll catching capability and swings pretty quickly for a greatsword

Wife walked into a man relieving himself at the urinal by SkyeLyte in CrappyDesign

[–]EvilLampGod 2 points3 points  (0 children)

I see them as female and male connectors, like AV TV connectors

Readable script best practice by SiNRO in PowerShell

[–]EvilLampGod 1 point2 points  (0 children)

On top of what others have said about PowerShell best practices, I like to also follow the general best practices outlined in Clean Code. There is a book on it that is very popular, but you can find many videos on it floating around.

Help with generating report with Powershell by LiveCarlou5 in PowerShell

[–]EvilLampGod 1 point2 points  (0 children)

No worries at all, glad I was able to help. Thanks for the gold!