L
L
LuckyRuS2019-07-16 07:50:28
PowerShell
LuckyRuS, 2019-07-16 07:50:28

How to set up an Exchange script for users from a file?

Good afternoon! Help solve the issue. There is a script to disable OWA for a specific user

Set-CASMailbox -Identity "Yan Li" -OWAEnabled $false

There is a list of users in txt of the following form
User1
User2
User3
How to configure owa disable for all users from this list? Here is how it is required in this form.
Set-CASMailbox -Identity "Path to file" -OWAEnabled $false

Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew AT, 2019-07-16
@LuckyRuS

gc "file path" | Set-CASMailbox -Identity $_ -OWAEnabled $false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question