Link to home
Start Free TrialLog in
Avatar of IT Support
IT SupportFlag for United Kingdom of Great Britain and Northern Ireland

asked on

power shell script for office 365 password expiry, calendars, focused inbox

hi, i hope you are well.

id like to build a power shell script for 365 to

1) turn off , domain wide, password expiry in office 365
2) set exisitng users calendars to uk location, uk time zone ((unless this can be done domain wide for existing and future)
3) turn off focused inbox for existing users (unless this can be done domain wide for existing and future)
Avatar of Alan Cox
Alan Cox
Flag of United States of America image

1) turn off , domain wide, password expiry in office 365
Are you using AAD Connect? This would be controlled via Active Directory. ELSE, Get-MSOLUser  | Set-MSOLUser –PasswordNeverExpires $true
OR... Admin center/Settings/Security & Privacy

2) set exisitng users calendars to uk location, uk time zone ((unless this can be done domain wide for existing and future)

https://www.vspbreda.nl/nl/ms-office/office-365/solved-office-365-bulk-set-language-and-time-zone-for-all-users-in-office-365/

3) turn off focused inbox for existing users (unless this can be done domain wide for existing and future)

https://docs.microsoft.com/en-us/office365/admin/setup/configure-focused-inbox?view=o365-worldwide
Avatar of IT Support

ASKER

hi alan, thanks for your time

i'll look at the links thanks.

the first bit of code i think just iterates through existing users. i want it off on the whole domain, and i dont want to have to go into the admin centre to do it, i want to add it to my script that makes connectors, turns on dkim etc.

i guess its not possible to domain wide change the calendar options as that doesnt really make much sense,  andt i can see that you could change it for existing users. can the default for a new user be changed  for both requests 2) and 3)
set-organizationconfig -focusedinboxon $False

for #1 are you using AAD Connect?

Admin center solution is a one time thing tenant wide.
oh top one for the focused inbox! i dont know anyone who likes it. well done.

i have not used aad connect.

i know i can go into the admin centre and turn it off, but it would be great if i can run my first time connect script in PS and have it do all the tedious crap that i might otherwise forget. ms even suggest one of the first things you do is turn it off, and yet they have it turned on by default! crazy!
ASKER CERTIFIED SOLUTION
Avatar of Alan Cox
Alan Cox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
we'll have to agree to disagree on the ficused inbox!

i look after lots of very small companies, so we dont do much else with 365 other than email and office licenses.

ok, i'll wait and see if anyone else has any magic bits of code for turning off password expiry, thanks for your help so far.