• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Clatent

Technology | Fitness | Food

  • About
  • Resources
  • Contact

365AutomatedLab

New Feature Announcement for 365AutomatedLab

September 18, 2023 by ClaytonT Leave a Comment

I wanted to let everyone know as of this morning you can add and remove Teams and Teams Channels with only 1 line of code and an Excel Worksheet using 365AutomatedLab.

It’s as simple as this:

New-CT365Teams -FilePath "C:\path\to\365DataEnvironment.xlsx" -AdminUrl "<https://yourdomain.sharepoint.com>"

And to remove those teams:

Remove-CT365Teams -FilePath "C:\path\to\365DataEnvironment.xlsx" -AdminUrl "<https://yourdomain.sharepoint.com>"

Let me know what you think. Do you want the ability to add more than 2 additional channels? Any of the other parameters you would like added for teams and channels? Eventually, I’ll add them all, but rather start with the ones that you most use.

As always feel free to reach out and I’m always open to PRs.

365AutomatedLab

Tagged With: 365, 365AutomatedLab, Automation, PowerShell, Sharepoint, Teams

One-Liner Wednesday August 2, 2023

August 2, 2023 by ClaytonT Leave a Comment

Have you ever needed to create multiple 365 Groups/Security/Distribution at one time? This could be for a new department, new office, or even a new campaign that only certain people need access and email to. I won’t even go into the time it would take to do this in the GUI, but how would you add them scripting wise, as there are 4 types of Groups/Lists in 365. Do you only do one cmdlet at a time and hope someone doesn’t come back after you’ve already done some and they need to add another group with a cmdlet you’ve already used?

I have a nice simple one-liner to fix this issue.

Add-CT365Group -FilePath "C:\\Path\\to\\file.xlsx" -UserPrincialName "admin@domain.com" -Domain "domain.com"

That’s it.

Ok, to be fair, PowerShell wise that is all there is to it other than installing the 365AutomatedLab module from Github. After that only 3 steps needed, and well worth it. Here are the steps:

  1. Create a workbook in Excel, and have a sheet named “Groups”
  2. Add the Headers “DisplayName”, “PrimarySMTP”, “Description”, “Owner”, and “Type”
    1. DisplayName is self explanatory as this will be the Display name for the group
    2. PrimarySMTP is the email address without the @domain.com
    3. Description is self explanatory as this will be the description value for the group
    4. Owner is only a placeholder, but will be adding that soon
    5. Type will be the type of group it is – and will pull the corresponding cmdlet
      1. 365Group
      2. 365MailEnabledSecurity
      3. 365Distribution
      4. 365Security
  3. Add your Group information in the corresponding fieldsExcel worksheet example

After those are filled in, you can run the script from above pointing to where you saved that excel file, and all those groups you added to the Excel worksheet named “Groups” will be added (As long as you have the correct permissions)

It’s really that simple. I’m looking to expand the properties you can add into the groups, if there are any you’d rather see first, please let me know.

I hope you found this useful and it saves you time/headaches from having to more manually add them! As always if I can help out in anyway, please feel free to reach out!

Microsoft Documentation on Group Types

New-UnifiedGroup

New-DistributionGroup

New-MgGroup

Tagged With: 365, 365AutomatedLab, Automation, Groups, One Liner Wednesday, PowerShell

Primary Sidebar

Clayton Tyger

Tech enthusiast dad who has lost 100lbs and now sometimes has crazy running/biking ideas. Read More…

Find Me On

  • Email
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

Recent Posts

  • New Feature Announcement for 365AutomatedLab
  • How ChatGPT saved our company $1500 in less than 15 minutes
  • Read-Only Friday August 4, 2023 End Of Life Server 2012R2 and managing EOL
  • One-Liner Wednesday August 2, 2023
  • Module Monday July 31, 2023

Categories

  • 365
  • Active Directory
  • AI
  • AzureAD
  • Cim
  • Dashboards
  • Documentation
  • Get-WMI
  • Learning
  • Module Monday
  • Nutanix
  • One Liner Wednesday
  • Passwords
  • PDF
  • PowerShell
  • Read-Only Friday
  • Reporting
  • Security
  • Windows
  • WSUS

© 2023 Clatent