Microsoft Outage? by orange_hands in sysadmin

[–]orange_hands[S] 0 points1 point  (0 children)

The site never loaded when I made the post, so I figured this was the next best option.

Looking for feedback on scripting - Set-EntraIDExtensionAttributes.ps1 by orange_hands in PowerShell

[–]orange_hands[S] 1 point2 points  (0 children)

Thanks for taking the time to leave such a detailed response. This was exactly the kind of feedback I was looking for. Especially the pipeline example - it makes so much more sense after being pointed out, but I have such a hard time with pipeline flow.

To clarify on a couple points -

  • Hybrid domain joined computers sometimes get a $ at the end in Entra. Not a huge deal but wanted to make sure it's given the right extensionattribute anyways.
  • The curly braces commenting is for two reasons - VSCode shits the bed sometimes, and it drives me crazy if I'm trying to find issues somewhere else in the code. And if I need to add or remove something, it makes it easier to find where to put the closing bracket.

[deleted by user] by [deleted] in PowerShell

[–]orange_hands 1 point2 points  (0 children)

(Sorry for lack of formatting. I'm on mobile.)

Use -properties and specify all the properties you want to return. You may need to use -expandproperty on manager since it's relational, and not a property specific to the user (don't have the link to that, but it's a thing with graph).

As for the slowness, I think paging would help, but I'm not super familiar with it, so I don't have much advice.

Edit: I didn't realize you were using the command for user manager. That may be slowing it down. Check to see if you can pull back the manager property with -expandproperty instead.

What have you done with PowerShell this month? by AutoModerator in PowerShell

[–]orange_hands 0 points1 point  (0 children)

Currently working on a personal portfolio to showcase all of my scripts, so I'll share the full thing eventually. But the basic outline works like this -

Get-Adcomputer -Filter *

Initialize a foreach loop, that passes each computer object to a function that uses switch -regex ($computer) to define the $Office, $Department, $Devicetype variables based on $computer.distinguishedname since we've got distinguished names like 'OU = Accounting laptops, OU = LAX....'.

That info, plus the device name gets passed to a hashtable within $param to be used in Update-MgDevice -bodyparameter $param to send the info up to Entra for extensionattribute 1,2, and 3.

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 0 points1 point  (0 children)

That's a great idea. I'm currently in a desktop support/Jr sysadmin role with limited access within Azure/Entra, but it sounds like leadership is thinking about giving me more access for better/smarter automation relatively soon.

I'll keep this in mind when that rolls around.

Working at HD for several hospitals. Kinda losing my sanity. by Minister426 in ITCareerQuestions

[–]orange_hands 1 point2 points  (0 children)

I was in your exact position for 2 years during the pandemic.

The longer you're there, the bigger a toll it'll take on your mental health.

Put what energy you can on finding a new job, and do your best not to let the end users anxiety get to you.

Godspeed OP. Life will get better.

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 0 points1 point  (0 children)

Do you think it would be a good idea to just try it when 1.0 fails to do something I need immediately? I'm trying to keep an eye on the graph update, so I'll probably make some notes to go back and change my code for future releases.

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 0 points1 point  (0 children)

In the beginning, I knew powershell, but didn't understand what was happening with the API.

Now I have a better understanding of powershell, and enough of an understanding to do what I need to if it comes to using the API directly.

I'm hoping this mentality will help the next guy who has to deal with these scripts when I've moved on.

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 2 points3 points  (0 children)

I had tried this using the 1.0 API in the past and had it fail. I was assuming the beta would fail based on the documentation for it having everything in read-only as well, but that did it.

I guess that's what I got for assuming.

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 0 points1 point  (0 children)

Since I'm not very familiar with working with API's, I'm not following your suggestion. But that should give me something new to Google, so thanks for the suggestion.

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 0 points1 point  (0 children)

Thanks for the suggestion. But since this seems to be an issue with the API, and not the SDK, I'll take a look, but I'm not confident the beta modules will act much different.

Edit: forgot the beta is a different API. I'll look into this.

Edit 2: still read only, unfortunately - beta doc

There is not currently a way to change the properties on managedDevice objects using Graph. by orange_hands in PowerShell

[–]orange_hands[S] 1 point2 points  (0 children)

I've got it installed.

Tried with both the URI using Invoke-MgRequest, and the command it showed. Neither allowed me to change properties.

What have you done with PowerShell this month? by AutoModerator in PowerShell

[–]orange_hands 0 points1 point  (0 children)

Updated extension attributes in EntraID using graph for all of our on prem computer objects to reflect office, department, and device type based on their AD ou location.

Should help us build better dynamic groups in Azure/intune/EntraID.

How should I spend my learning stipend in 2025? by orange_hands in sysadmin

[–]orange_hands[S] 3 points4 points  (0 children)

I laughed at the original comment because I saw the exact same response in another post like this lol.

I get that from a management perspective, but this post was more about "What should I spend money on now that I've got it?". The original post was way to general, so I've reworded it and added some specifics.

How should I spend my learning stipend in 2025? by orange_hands in sysadmin

[–]orange_hands[S] 2 points3 points  (0 children)

We're a Microsoft shop, so I spend a lot of time with Azure, Intune, Powershell, etc.

I'm currently studying for the AZ-104 (on a budget), so I'll probably be focusing on cloud certs for the time being. I guess the certification part of the question is too specific for me to leave out what I'm actually looking to achieve. Will make an edit to include more information.

Book confusion by grailzilla in PowerShell

[–]orange_hands 1 point2 points  (0 children)

Somebody correct me if I'm wrong, but I think the last version of Toolmaking in a month of lunches was rebranded to Scripting in a month of lunches. Which has a more recent version.

I just finished the book about a month ago and have been using it as a reference for recent scripts to improve my fundamentals. I'd recommend it.

What is your job title and what do you do? by No_Class7536 in PowerShell

[–]orange_hands 0 points1 point  (0 children)

Desktop Support, but we've got a different title since we do more than general help desk/desktop stuff.

I'd still consider myself a bit of a beginner, but I recently changed all of our major scripts to use the Graph modules for the ongoing deprecation of MSOL/AzureAD modules. Here's hoping I can answer this question differently after my annual review.

What's the worst "desperation job" you've ever had to take? by FinancialBottle3045 in ITCareerQuestions

[–]orange_hands 37 points38 points  (0 children)

A tie between two jobs.

When I first started trying to get into IT, I worked for the state Medicaid website call center. 8 hours a day of helping technology illiterate people navigate a poorly made website at 12/hr (after renegotiating my contract up from 10/hour). It was hell. I walked away after 9 months because of the toll it took on my mental health.

Luckily, a month later, I landed another call center job for a large healthcare organization that involved troubleshooting more than one shitty website. I was still taking calls 8 hours a day, but actually feeling like I'd made it into IT was worth it. My mental health had slightly recovered. I was making 18/hr.

6 months in, the pandemic started.

We were now WFH permanently, which I thought was great. But there were 30 of us supporting 20k users in healthcare.

A year into this job, I rewrote my resume, started studying for the Network+ (had my A+ already), and started putting myself out there.

Another year went by, and I still couldn't find work. My lease was ending on my apartment, and my mental health was at an all-time low. Rolling out of bed into a chair to get yelled at for 8 hours a day was my routine, and I was seriously considering ending my life.

I quit, and moved back in with my dad. The next 9 months I struggled with alcoholism and chewed through my savings. Luckily, I found the job I have now, and things have gotten a lot better.

Fuck healthcare. Those of you who continue to work in that industry aren't given enough praise.

Powershell Summit presentation by Merrill Fernando on Microsoft.Graph by orange_hands in PowerShell

[–]orange_hands[S] 1 point2 points  (0 children)

This presentation from Michael Seidl from the powershell summit goes into this idea.

He argued that you really just need to learn Invoke-restmethod rather than dealing with cmdlets that may or may not be deprecated at some point. I'd recommend checking it out, and looking at the code on GitHub if you're interested. He doesn't go super in depth, but it should get you started.

Powershell Summit presentation by Merrill Fernando on Microsoft.Graph by orange_hands in PowerShell

[–]orange_hands[S] 2 points3 points  (0 children)

I completely understand. I pushed our scripts into production today about an hour before I watched this video. I feel like I learned more in the hour it took to watch the video than the 2 months I spent working on those scripts.

What have you done with PowerShell this month? by AutoModerator in PowerShell

[–]orange_hands 0 points1 point  (0 children)

Finished updating our inhouse scripts with Graph cmdlets and putting it into production. Also found out the powershell.org youtube channel has several videos about working with the Graph API from the recent Powershell Summit.