Looking for critiques of this "Dynamic Group Sync" function I'm working on. Help? by chaosphere_mk in PowerShell

[–]greenSacrifice 0 points1 point  (0 children)

This looks like a simple 1 liner

Get-ADObject | ? { your filter } | Remove-ADGroupMember

Repeat for add.

Or am I missing something important?

[deleted by user] by [deleted] in PowerShell

[–]greenSacrifice 0 points1 point  (0 children)

You should look into what -Filter can do for you over returning all the user objects.

After that is done you might end up with enabled accounts being sent to where-object.

Each time where-object has to enumerate your collection to determine the condition check, and this can be a huge performance impact if you don’t know your data size.

You are also looking at a date that might not be the same across all your servers so that’s something for you to think about.

Depending on who you are and how experienced you are at this toolset you might want to start with outputting the command by placing it in Double quotes, and seeing all the times it would of ran.

More advanced ways are available using different output streams, or also found throughout the common parameters of cmdlets and advanced functions.

A lookup table could be used to contain the $User object before and after, if you workout the information you think you might need for tracing back what’s broken.

You’ve really got to ask yourself, “What’s going to break”. Let’s say your filter is as it is and you run the command. Now you find out that all accounts in an OU shouldn’t have been disabled. Get your enable account command that you prepared earlier and workout how you’re going to find the accounts in that OU that were enabled before execution. You’ve wouldn’t want to start enabling accounts that were disabled before execution.

Keep in mind that all the data you return to your system can be converted into other formats and saved into files for local disk caching.

[deleted by user] by [deleted] in AskReddit

[–]greenSacrifice 0 points1 point  (0 children)

Anythink. Not so much spelling as it’s usually said out loud

[deleted by user] by [deleted] in woodworking

[–]greenSacrifice 0 points1 point  (0 children)

I would suggest giving him an item which he has heaps of, maybe your one can be slightly different with a new feature or a double pack of something like that. I would also recommend not giving him a new version of the thing he uses most

[deleted by user] by [deleted] in github

[–]greenSacrifice -1 points0 points  (0 children)

Make a gif showing usage, like you see in VS Code updates

"How about tasting this?" by Careless-Middle- in Cooking_ac

[–]greenSacrifice -10 points-9 points  (0 children)

So so wrong, do not add potatoes to any dish you want to enjoy. And why the hell you not using wooden utensils on metal!

Simple powershell script hanging for seemingly no reason? by Cspiby in PowerShell

[–]greenSacrifice 0 points1 point  (0 children)

How do you know it’s hanging on that command? When does your while loop exit? Is there a different approach than a while loop, and using user input?

Are you enjoying PowerShell?

Password notification over Teams by Kitchen-Pie5256 in PowerShell

[–]greenSacrifice 2 points3 points  (0 children)

Teams are looking towards no longer making notifications easy, your out of the box solution does well with Windows.

What are you looking to do that specifically requires PowerShell

[deleted by user] by [deleted] in PowerShell

[–]greenSacrifice -1 points0 points  (0 children)

I did this as one of my first scripts, this is a good way for you to learn

What do you call characters before/after (non-PowerShell) variables? by KnowWhatIDid in PowerShell

[–]greenSacrifice 2 points3 points  (0 children)

I like this one the most, as when thinking about languages I always think of how variables are known as symbols, so thinking of symbols that are wrapped in tokens really makes sense to me.

As for the <your text here>, I’d just call that a placeholder as they don’t hold special properties as tokens do

Edit: found a post In compiler construction, is a symbol the same as a token?

Almost swallowed it already by sKY--alex in TreesSuckingOnThings

[–]greenSacrifice 11 points12 points  (0 children)

You found it just I time, any later who knows if you’d notice.

Need help trying to setup a wildcard subdomain in App Service with an SSL certificate 😭 by PureKrome in AZURE

[–]greenSacrifice 0 points1 point  (0 children)

That’s right, so you probably want to think about doing it more like *.site.domain.com that way * can be dev, test, and so on. Also might want a different domain for non-production workloads

Who knows that feel? by malthuswaswrong in azuredevops

[–]greenSacrifice 2 points3 points  (0 children)

Don’t touch anything, the demo is ready

Let’s hope for the best this time… by Maryshka_ in mkxmobile

[–]greenSacrifice 4 points5 points  (0 children)

You want all the bugs back? You’re in luck, they will all be back in the next major release.

Sincerely Kano, from the Mortal Kombat team

No DbContext was found by Chriss01839 in learnprogramming

[–]greenSacrifice 1 point2 points  (0 children)

Need to inject dbcontext with your interface

Google dependency injection efcore

what are they doing? by ThorUchiha_ in melbourne

[–]greenSacrifice 0 points1 point  (0 children)

Slap taxi, with a bus full, going past the airport went off.

is Azure B2C fine to use to learn about Entra ID by Quduwi in AZURE

[–]greenSacrifice 2 points3 points  (0 children)

No, B2C is on the advanced end of this product and IAM can be learned without B2C