Isaias Perez
asked on
Powershell Script Request. - Bulk Enable Archival (Office 365)
Powershell Script Request. - Bulk Enable Archival (Office 365)
Im trying to setup a script that will do a fore each loop that will take CSV file that has a heading of UserPrincipalName of a list of 100s of F1 Licensed Users. i am trying to enable archival for all those users listed. I tried to get this started. I know that the command to enable archival is the following:
Enable-Mailbox -Identity $usernames -Archive
So i started by trying to put the scrip together myself but i am kindve stuck. Not sure how to pass the object.
$usernames = Import- csv .... $_.UserPrincipalName
foreach ($username in $usernames) {
Enable-Mailbox -Identity $usernames -Archive
}
Now I'm not 100% sure here that -identity even takes the UPN, will have to research that. can anyone help?
https://docs.microsoft.com/en-us/microsoft-365/compliance/enable-archive-mailboxes
Im trying to setup a script that will do a fore each loop that will take CSV file that has a heading of UserPrincipalName of a list of 100s of F1 Licensed Users. i am trying to enable archival for all those users listed. I tried to get this started. I know that the command to enable archival is the following:
Enable-Mailbox -Identity $usernames -Archive
So i started by trying to put the scrip together myself but i am kindve stuck. Not sure how to pass the object.
$usernames = Import- csv .... $_.UserPrincipalName
foreach ($username in $usernames) {
Enable-Mailbox -Identity $usernames -Archive
}
Now I'm not 100% sure here that -identity even takes the UPN, will have to research that. can anyone help?
https://docs.microsoft.com/en-us/microsoft-365/compliance/enable-archive-mailboxes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
F1 does not support archiving to the best of my knowledge
ASKER
Thank you very much Alex. This worked perfectly.