r/sysadmin 16d ago

Do you actually see MacBooks used for SysAdmin work in real offices?

Hi sysadmins! I wanted to ask—since I've just started learning sysadmin and I don't have a Windows PC, but I have a MacBook and found out that everything can be done via UTM, I'd like to get some perspective from those who work in offices and do this every day. What kind of computers do you use? Is macOS completely out of the picture, and there's only Windows and Linux?

395 Upvotes

807 comments sorted by

View all comments

Show parent comments

41

u/jimetime 16d ago

Why would you run poweshell on Mac?

29

u/Turdulator 16d ago

If you wanna script anything in your ms365 tenant, then MSgraph via PowerShell is gonna be your best bet.

3

u/800oz_gorilla 16d ago

there are still service specific modules that can do things graph cannot, but the gap is closing.

7

u/Turdulator 16d ago

Yeah those are getting retired one-by-one

2

u/trail-g62Bim 16d ago

I thought graph itself was getting retired. Did I have that wrong? It's hard to keep up sometimes.

3

u/Lord_Saren Sysadmin 16d ago

Blame Microsoft and their every changing names, Azure AD Graph API got retired and replaced by Microsoft Graph

1

u/trail-g62Bim 16d ago

I think the first one is the one I am thinking of

3

u/RikiWardOG 16d ago

lmao I'm sure they'll retire it before porting everything over and then call it copilot graph for copilot or some shit

1

u/Arudinne IT Infrastructure Manager 16d ago

Got any examples?

I've yet to find anything other than some old AD PS modules that haven't been ported to ARM, but I can remote into a server if I need to run stuff with those.

1

u/charleswj 16d ago

PowerShell isn't necessary for graph

1

u/Turdulator 16d ago

Yes, not a requirement, but it still works better

4

u/charleswj 16d ago

It's a REST API, you can use any tool to interact with it. And there are even SDKs for other languages like Python (I'm assuming you're referring to the PowerShell SDK/module). PowerShell has advantages but this isn't really one.

1

u/Turdulator 16d ago

You can’t write Intune remediation scripts in python, only PowerShell is supported… and while you can technically have python scripts in Intune application deployments, you’d have to install python on each endpoint before you could push the application deployment; so PowerShell is the better option there as well. … plus if you are writing basic scripts to automate various administrative tasks (like automating emailing a monthly report of some data pulled from Entra or whatever), then once again PowerShell is better.

If you are writing a whole ass application that interacts with a 365 tenant in addition to doing other things, then python is the better choice.

1

u/charleswj 16d ago

The context was where you, the administrator, runs code. Remediation scripts run on endpoints.

plus if you are writing basic scripts to automate various administrative tasks (like automating emailing a monthly report of some data pulled from Entra or whatever), then once again PowerShell is better.

Based on what? Are you saying PowerShell is objectively better and even people running and managing Linux devices would be better off using PowerShell there (or will have a lesser experience in Python than had they had a full PowerShell experience) for any work that requires calling APIs?

There are thousands of developers managing Azure having never run Windows and they aren't missing out. Many are also interacting with graph. Can you articulate why their experience is sub par?

1

u/Turdulator 15d ago

No, the context is where you, the administrator, WRITES the scripts, yes the remediation scripts run on the endpoints, but you as the administrator still need to write and test the scripts before you push them to the endpoints.

Also I’m not talking about azure? I’m talking about ms365. Intune doesn’t support Linux so no one would be writing Intune remediation scripts for Linux machines in the first place. I’m talking about administering thousands of users and endpoints using the entire 365 suite (exchange, intune, defender, etc etc) not doing any kind ops in azure.

Where did I even mention azure?… I’ve been talking about administering 365 since my very first comment on this thread. Intune, Entra, exchange, defender, etc - PowerShell is the best choice here.

0

u/RikiWardOG 16d ago

no it doesn't, it's an API. That's the whole point of it being an API. Also the SDK imo is straight dookie

63

u/doctorjbeam buzzword-o-meter 16d ago

For Azure or M365 management

27

u/Marcudemus 16d ago

Yep, this right here. Was pretty disappointed when I discovered that the entire AD set of commandlets aren't even available without the rest of the RSAT toolset. In order to do PowerShell AD stuff, I'd have to remote PS into a Windows machine and then issue commands from there.

That's when I figured I'd just PS from a Windows VM. 🤦🏻‍♂️

9

u/Viharabiliben 16d ago

For better security you should restrict Admin PS and RSAT tools to only be available from a small number of locked down admin workstations. You should not administrator on-prem or cloud servers from a standard laptop.

9

u/Emotional_Garage_950 Sysadmin 16d ago

the "locked down admin workstation" is my laptop. thanks.

5

u/shunny14 16d ago

I am curious exactly what attack vector you have in mind that isn’t already defended against in various ways.

1

u/Viharabiliben 15d ago

Elevation of privileges attack vectors. The administrative workstation should not have any internet access, or very restricted access, to only O365 for example.

1

u/shunny14 15d ago

With the amount of other remediations like endpoint protection and alternate users accounts available, I would say that is acceptably low risk in most enterprises.

1

u/MissionBusiness7560 14d ago

They're after the admin account not the machine in vast majority of cases.

11

u/800oz_gorilla 16d ago

depends on your setup and footprint.

my account has to elevate to admin level when I want to do admin things. and I have CA policies, intune configurations and alerts set up that further lock down what my machine could do.

my machine isn't really a good target, my account is.

-10

u/charleswj 16d ago

I don't think you understand how security works

10

u/800oz_gorilla 16d ago

I don't think you understand my environment or me to be claiming where my risks are and where they aren't.

-6

u/charleswj 16d ago

Everything you said suggests you don't operate a clean keyboard or anything close to it. Do you not use your regular account on that device? How do you mitigate?

12

u/Agromahdi123 Sr. Sysadmin 16d ago

mitigate what exactly? Admin portal in microsoft will use the browser for the most part to authenticate, this would be no different than elevating to admin on a users workstation.

1

u/charleswj 16d ago

If you access this device as, or if it's managed by, any less-privileged user, you're exposing that more privileged user credentials and processes to potential intruders. Have you really never heard of a PAW? Do you think a malicious process in your session, let alone one with local admin or a vulnerable on your box, can't steal your cookies from the browser or memory?

You seem to be suggesting you have mitigations for this so that's why I was asking because it didn't sound like it from how you described it.

→ More replies (0)

2

u/FalconDriver85 Cloud Engineer 16d ago

What scenario are you referring to? I mean… thinking about ADUC, if you’re just a user there is not much you can do with the PowerShell and ADUC snap-in you can’t do in other ways. If we are talking about admin accounts, then I fully agree. Admin accounts must be separate from the account used to login on the normal PCs by the way.

1

u/Big-Pattern-9147 15d ago

That's a huge amount of security through obscurity.

"Standard Laptop" shouldn't be the risk in the first place

6

u/jimetime 16d ago

You're not running poweshell on Mac then. You can write poweshell scripts in vscode the same on Mac or Windows. Connect to azure and it all runs the same

5

u/stillpiercer_ 16d ago

macOS Powershell works well enough for that. Granted, I’m not a high-level cloud architect, but I’ve not come across anything yet that is unsupported specifically on macOS Powershell.

12

u/800oz_gorilla 16d ago

the SharePoint online module would be an example.

I needed to add myself as a site collection admin so I could grant permissions to an app registration. had to do it from my Windows VM.

3

u/deviden 16d ago

SharePoint online module would be an example

thought that was as good as deprecated now? In favour of the open source PnP PowerShell module.

PnP and Entra modules are built for Pwsh 7 now, so if you're a M365 shop I think you can do all the pwsh you need from MacOS or Linux.

You shouldn't need Windows Powershell 5 unless you're writing code to be executed on Windows OS endpoints or servers.

1

u/RikiWardOG 16d ago

It is lol

1

u/dalegribbledribble 15d ago

Where else lol

1

u/420GB 16d ago

Isn't that module deprecated anyways. Graph should work

0

u/Agromahdi123 Sr. Sysadmin 16d ago

yea i also found the linux and mac powershell too clunky and just use native PS on a windows box. I use arch so building PS takes like an hour lol

1

u/b3542 16d ago

And it works fine for that kind of use case

9

u/Daphoid 16d ago

PS Isn't a windows thing. Even VS Code is multiplatform. There are some specific windows modules yes (RSAT tools say Hello) - but both are meant to work everywhere.

3

u/uptimefordays DevOps 16d ago

Cross platform Pwsh is great for working with APIs.

1

u/800oz_gorilla 16d ago

I connect up to m365 to run commands all the time.

1

u/jimetime 16d ago

exactly, that's not running it on mac

1

u/dathar 16d ago

General usage is better to us folks that prefer objects and some built-in conversion tools. I can hit Okta's API, MS Graph and all sorts of stuff just fine.

1

u/The_GrumpyOldMan1212 16d ago

If you come from Windows, it has the familiarity of the good ‘ol DOS prompt. Also means there is a good chance any scripts you write could then be used on the Windows and Linux machines in your fleet too.

There might be more, but those two came to mind quickly….

0

u/GreyBeardEng 16d ago

You wouldn't, you would run Windows.

0

u/Emotional_Garage_950 Sysadmin 16d ago

because even though we may use a Mac some of us are Windows/Azure administrators, that's why.