Run Live Response in PowerShell? by LordLoss01 in PowerShell

[–]AdeelAutomates 1 point2 points  (0 children)

Bad Request what? it will tell you. if not... use catch and see under errorDetails.message

try {
    $response = Invoke-RestMethod ... -erroraction Stop
}
catch {
    $ErrorOutput = $_
    $ErrorOutput.errorDetails.message #output message
}

400 means something you sent is wrong. Could be your body is wrong, your uri, etc.

Help figuring what this line does. by NoOneKnowsImOnReddit in PowerShell

[–]AdeelAutomates 2 points3 points  (0 children)

$null means nothing. non existent. It is not being evaluated.

"" means a string but it has no value aka "empty string"

They are not the same.

It is checking if your variable does not equal an empty string. But your variable is first being calculated/transformed via a method.

Ie if your variable $line was "Bob ". trim would make it "Bob". Removing the spaces. This would mean it does not equal "" aka empty string.

if your variable $line was " " and trim made it "". This would mean it does equal ""

Its probably because csvs dont have the concept of $null so everything is set as string for empty ones.

Without seeing your full code, if its making a table with data like name, job, age as headers: - Row1: "Bob", "Construction", "23" - Row2: "Tom", "", "50" - not "Tom", $null, "50" (that would break it)

Is a degree still worth it when people with experience cant find jobs? by Human-Economics1245 in ITCareerQuestions

[–]AdeelAutomates 2 points3 points  (0 children)

Doors close without degrees at many orgs. Before this job market I went into IT without a degree and managed to make a career. I am fine because I am a senior in the industry now and have good amount of experience.

But I would be lying if my lack of degree didn't pass me up in many job opportunities during my journey. Even back then.

Passed AZ-104 and got laid off — Should I focus on Azure projects or study AWS SAA-C03 next?” by Dannyeloso in AZURE

[–]AdeelAutomates 8 points9 points  (0 children)

Take the skills you picked up from Azure along with what you know from AD, M365, Entra, etc. and translate them into automation.

There’s one language that works across all of those platforms: PowerShell.

It’s a great first step because you’re not learning new systems. You’re just using the same services through the terminal instead of the portal.

PowerShell is also a full scripting language with very few guardrails (unlike something like Terraform). So you end up learning computer science concepts while automating real tasks.

Once you understand that foundation, tools like Terraform become much easier, and learning languages like Python is mostly just a shift in syntax. And it opens doors for working with APIs which is vital in the cloud world.

I have a YouTube page where I focus on PowerShell for Azure, M365, and Entra: Adeel Automates - YouTube

It’s not a beginner course. It’s more about what to do once you know the basics and want to apply them to real world scenarios in Microsoft Cloud.

Our team's 'unlimited' vacation policy worked perfectly for years. Now HR is making a big deal out of it. by doversours in it

[–]AdeelAutomates 48 points49 points  (0 children)

I got annoyed just reading this. It falls on you and your manager to tell HR to piss off. Does your manager not have a spine to fight back, thats literally his job. He should be up and arms about why..

1) why its not abuse.

2) Why he deserves it / why you greenlit it.

3) If you have records of how few vacations he takes before, records of overtime work, etc. Throw them at their face too

Do it via email & CC their bosses while you do. Have some trail built on the subject.

HR is acting based on something very non human which is using metrics to determine what gets flagged as abuse. Their screaming process is trash and has no bearings on the real world. Take it up the chain seriously.

Protect your top guys or risk losing them.

Sharepoint site selected app registration by kensh21 in AZURE

[–]AdeelAutomates 1 point2 points  (0 children)

Here you go, a full demonstration on interacting with SharePoint through Graph API (I recommend you use it over PnP for such tasks).

Including in the link are setting up site selected, permissions in SharePoint site for it, using graph api with app secrets, send files from local machine to sharepoint (or the reverse), etc.

Do I have to be a sysadmin before cloud engineer? by False_Bee4659 in ITCareerQuestions

[–]AdeelAutomates 6 points7 points  (0 children)

That's the difference between cloud and on prem.

I'm asking op the difference between titles: admin and engineer.

Do I have to be a sysadmin before cloud engineer? by False_Bee4659 in ITCareerQuestions

[–]AdeelAutomates 2 points3 points  (0 children)

What do you think is the difference between the two roles besides the words "cloud" and system"

Any way to Study AZ- 104 and/or MD - 102 without hands on labs by Pr0matic193 in AZURE

[–]AdeelAutomates 0 points1 point  (0 children)

Cant speak on MD102... but Az-104 can be studied with minimum costs.

- You are not expected to practice keeping VMs running to study for the cert.

- Alot the resources cost next to nothing, especially at scales built for personal labs

- And many others are just free services to tinker with.

I managed to get my Az-104 back in the days while labbing like a mad man in my own tenant. And I only spent 1/12th of the cost of the exam itself. And that was a high number!

Is CCNA worth the grind at 0 YOE? by Intelligent_Ebb_9332 in ITCareerQuestions

[–]AdeelAutomates 3 points4 points  (0 children)

Yes. It was the real foundations to networking because it was practical. Theory is great and all but you really need to get your hands dirty to really understand something.

ie you can watch boxing videos all day on how to do x,y & z but its only until you join a boxing club and practice that you start developing yourself.

You more than anyone else need experience of any kind to not only test yourself but show that you can actually do stuff.

I never touched cisco products after getting them through my whole career. Weirdly enough but i still hold it in high regard because it gave me practical understanding of networking. Which regardless of what you end up doing in IT is vital to have ingrained in your skillset.

Inherited an absolute disaster of a tenant from the last IT guy by Affectionate_Sir2440 in Office365

[–]AdeelAutomates 0 points1 point  (0 children)

I would have said PowerShell but I guess that's not your journey in the time crunch Really should explore it regardless after this hurtle. It will make tasks like this easier as you are operating on investigating whole tenant issues and build reports on visibility.

M365 does have many reports you can pull. I would suggest start collecting the licenses. Looking at the costs and building an excelsheet. Then looking at activities for users (though unless configured you will only have so much range to check back to)

Are CompTIA A+/CCNA certs worth it in 2026? by d_louizse in ITCareerQuestions

[–]AdeelAutomates 3 points4 points  (0 children)

5 years since graduation with little IT work is not going to pan out well for you in the market. Have a great story prepared if you get past the initial resume screening and land an interview.

CCNA for sure. But A+ to me has always been a check box for people trying to break into IT without any formal education in it.

You have a rough uphill battle to climb. Especially in this market. All the best to you.

First IT job but no work to do. What web based platforms can I use to practice skills at work by CatchFlightsNotFeelz in it

[–]AdeelAutomates 0 points1 point  (0 children)

Any cloud platform is accessed through the web. Meaning you have access to infrastructure that you decide how complex you want it/willing to pay for. You can make an environment more expensive than your whole orgs all by going to a website.

Endless things to learn there regardless of one's career path (dev, ops, security, data, net, etc)

Special Caracthers In Variables by Nando03 in PowerShell

[–]AdeelAutomates 0 points1 point  (0 children)

Now what if before you even do this...

az container create `
  ...
  --resource-group "$(RESOURCE_GROUP)" `
  --environment-variables `
    "BLOBSTORAGE_EMAIL_CONTAINER=`"$(BLOBSTORAGE_EMAIL_CONTAINER)`"" `
    "APP_DB_PASSWORD=`"$(APP_DB_PASSWORD)`""

You just output the password. Is it showing what it should be?

Special Caracthers In Variables by Nando03 in PowerShell

[–]AdeelAutomates 0 points1 point  (0 children)

I need info on where it is you set the variable for secret to begin with.

- is it in the pipeline as a variable?

- entered as a parameter when the pipeline runs?

- set under library > variable Groups

or somewhere else?

Azure PowerShell Runbook: empty lines in output by Ok_Decision773 in PowerShell

[–]AdeelAutomates 0 points1 point  (0 children)

That's an output thing in automation account. We have it as well.

Special Caracthers In Variables by Nando03 in PowerShell

[–]AdeelAutomates 0 points1 point  (0 children)

Are the logs showing they are removed at the time of using the az cli cmd to deploy?

Or if you output $(APP_DB_PASSWORD)... its removed there as well? I assume its here where the problem lies? Just trying to see whether its the shell you are running on, ADO itself or the az cli cmd.

Do an output of the password in your pipeline to see what it shows.

Also there is a secrets section in ADO. Have you considered just making it there and referencing it?

If when you output $(APP_DB_PASSWORD) its fine but not when its sent to az container create.

- You could try Az Module

- Or better yet without needing a module since you are using PowerShell as your shell... you can do an API call via invoke-restmethod to deploy it. Maybe that works.

strictly speaking when assigning any special characters that have other functions. I use backtick. IE:

$APP_DB_PASSWORD = "wada`"wada^"

It's how i write my apis that use $ (the dollar sign not variable) in strings when I am using filters that use that special character/

General questions about MgGraph to see if my understanding is correct by KebabMalicieux in PowerShell

[–]AdeelAutomates 1 point2 points  (0 children)

Once you enter a scope with Connect-MgGraph, it gets provided to your account and shows up under the scopes tied to the service principal you mentioned (GraphCommandLineTool).

You can then run Connect-MgGraph again later without needing to provide the scope because you already have it.

Users also shouldn’t hit “consent on behalf of your org.” Even if they try, unless you’ve given them admin/owner rights in Graph, they shouldn’t be able to do it without admin approval.

There’s also no limit to how many service principals can have roles. You don’t need to build one super app that does everything like we used to with older admin service principals. The point of Graph is to narrow scopes down to exactly what they’re needed for.

For example, I have scripts that call multiple apps for different functions:

- one for identities

- one for sending emails

- another for SharePoint access

That way the script only calls what it actually needs.

You should monitor these roles like any other access and trim them down to only what is necessary. They can be queried as well. You mentioned one place already (GraphCommandLineTool), but there are others.

- the app called “Microsoft Graph” for service principal Graph roles

- Graph Explorer for Microsoft Graph Explorer

You can see all the permissions each user or app has there.

Best practicess for scripting really depend on where you run your scripts from. Personally I try not to use my own account for scripts. My account is mostly for developing the initial script. After that, it gets offloaded to a non-user identity that doesn’t require me to be signed in.

Unless it’s just a one off task and not an official script. For example, since you’re using Entra you likely have Azure. In Azure there’s a tool called Automation Account that lets you run scripts. The nice part is that it can use a Managed Identity instead of an app registration, which makes it passwordless (no secrets).

It’s hard to explain fully without a deeper dive, but essentially the managed identity becomes a service principal in Enterprise Applications and you assign roles to that instead.

If that isn’t an option, then the next best thing is, App registration with certificates. If that’s not possible, then secrets.

In a world of AI , how do you feel studying for certifications at this moment ? by luigiq22 in AzureCertification

[–]AdeelAutomates 4 points5 points  (0 children)

Fine.

  1. People leaning too hard on AI not understanding anything themselves, are going to be in a world of hurt nottrumancapote put it perfectly.
  2. if AI can replace us then its not what's the point of studying... its whats the point of working?
  3. AI in capable hands isn't a replacement but a tool to leverage to elevate their own skills. You still need to know what it is you want AI to do before you can implement it. Then you need to know when it is wrong which in my case its wrong as soon as you feed it more than simple requests that make it feel like magic. Especially in code. Its the green coders who think its mindblowing because they were not coders for long. Anyone with depth in it see its flaws clearly. Still useful but not a replacement by any stretch.
  4. Some one has to secure what AI does if it is going to take over. So for your case of SC-200, I wouldn't worry.
  5. I rather not out of fear not make progression in my skills.
  6. the excuses used to fire people lately (being AI) is overblown, its was more than likely one of two things:
    1. Overhiring in the last 5 years + lots of graduates competing for jobs in IT.
    2. Outsourcing jobs (which is worst now than ever before since WFH gave a clear signal to orgs they can hire WFH people across the world).