exchange
91 TopicsConnecting to multiple Microsoft services with the same session
Hi guys. Working on a script that needs to connect to ExchangeOnlineManagement, TeamsOnlineManagement, SharePointOnlineManagement.... The script will be used across many different tenants, and I also plan to make it publicly available, so 1) I don't really want to pre-configure some complicated key setup and 2) I don't really want to have login pop-ups over and over again... For ExchangeOnline, I learned (accidentally), if I do this: $upn = Read-Host -Prompt "input yer wahawha" Connect-ExchangeOnline -userprimaryname $upn Connect-IPPSsession -userprimaryname $upn And login to MY tenant, I don't get prompted for login. I think likely because my device is Entra-joined, and it's using my Microsoft account. But even if I use a different account, it will only prompt me once - reusing it for the other. This is great, and exactly how I wanted things to flow - but now I'm trying to do Connect-SPOService (sharepoint) and Connect-MicrosoftTeams... and while both of these are part of the tenant, they don't take the -userprimaryname param - so I can specify to use the account I'm logged into my PC with.. The end-goal is to have this script run with minimal user input. I've SORT OF found a workaround for SharePoint, where I can get the SharePointSite from ExchangeOnline, then modify it a bit and use it as input for Connect-SPOService... but Teams, while it doesn't have the URL param requirement, DOES prompt me to login again. Is there a way to use the existing session for either of these, like I've done with ExchangeOnline / IPPSSession? We have MFA enabled, though not required from within our company network - but when I try to use Get-Credential, it errors me out because it wants MFA.13Views0likes0CommentsChange work hours
Hello, I am trying to change users' work hours as I would do via the web interface. However, I am unable to find a way to do this using PowerShell. I’ve seen suggestions to use Set-MailboxCalendarConfiguration, such as: Set-MailboxCalendarConfiguration -Identity email address removed for privacy reasons -WorkingHoursStartTime "09:00:00" -WorkingHoursEndTime "17:00:00" However, I need to set different working hours for each day, and I can’t find any parameters that would allow me to do this. Is this possible? Do I need to use Update-MgUserMailboxSetting for this? Thank you, Alejandro23Views0likes1CommentThe term 'New-MailContact' is not recognized
Hi Support, I am trying to bulk import external contacts to the tenant. I have come across several other Q&As which have the similar issue. However, the issue is slightly different - I have assigned this test account recipient management role which should be able to create mail recipient and related stuff. This user, eg, test user, is able to do it from the online version from exchange admin center but cant use the cmd to run via powershell. It was working probably a week ago and I haven't changed anything. It also works fine when authenticating using a global admin account. Looking forward to your reply. Thanks in advance, Sheila71Views0likes4CommentsPowershell error when using install-module
Hello ! when I use Install-Module -Name ExchangeOnlineManagement I get the following error : Install-Package: The module 'ExchangeOnlineManagement' cannot be installed or updated because the authenticode signature of the file 'ExchangeOnlineManagement.psd1' is not valid. I use powershell 7.5.0 Any help is welcome. best regardsSolved107Views0likes2CommentsInternal Server Error when Setting Mailbox properties
I have a Power shell script to setting Mailbox properties below Notes, Mail Tip, Seniority Index, etc It always run good, but today shows the error below >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> You want to perform this operation? User ID: "MB001.onmicrosoft.com" Y(Yes) You want to perform this operation? User ID: "MB001.onmicrosoft.com" Y(Yes) MB001.onmicrosoft.com Resource setting completed. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> You want to perform this operation? User ID: "MB002.onmicrosoft.com" Y(Yes) You want to perform this operation? User ID: "MB002.onmicrosoft.com" Y(Yes) MB002.onmicrosoft.com Resource setting completed. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> loop.......... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Then I check all the Mailbox properties, the all settings is correct looks no problem. What kind of error could be possible? Is there any solutions? Any information will be appreciated!89Views0likes2CommentsHow to remove Google Meet links and add Teams links in all recently migrated calendar events?
Hello, we have just finished migrating our company from Google Workspace to O365. Things went more or less smoothly, but now we're noticing that all of our migrated calendar events still have the Google Meet link associated with them. Is there a way to bulk remove all Google Meet links from all of our calendar items and replace them with Teams links? Many thanks in advance!21Views0likes1CommentGenerate vCard for each user in Exchange online and attach to user's mail.
We are looking best method to create vCard for each user in Exchange online and attach vCard in user's outlook for outgoing email. Is there any script or tool to programmatically create a vCard, that can generate .vcf files with the desired contact information for each user and integrate to Exchange online to apply to corresponding user.26Views0likes0CommentsRemote execution with exchange powershell
I'm trying to extract the primarysmtpaddress of each member of a distribution group from an exchange server in a remote forest. The bulk of the script is something link this $parameters = @{ ConfigurationName = 'Microsoft.Exchange' ConnectionUri = 'http://srvwex.company.local/powershell' Credential = $sourceCred # Authentication = 'Basic' ScriptBlock = {{(Get-DistributionGroup $args[0] |Get-DistributionGroupMember).PrimarySmtpAddress }} ArgumentList = $DG.Alias } $RemoteMembership=(Invoke-Command @parameters) but I got the following error The syntax is not supported by this runspace. This can occur if the runspace is in no-language mode. + CategoryInfo : ParserError: ({(Get-Distribut...rySmtpAddress }:String) [], ParseException + FullyQualifiedErrorId : ScriptsNotAllowed Running the command (Get-DistributionGroup distributiongroup | Get-DistributionGroupMember).PrimarySmtpAddress locally on the remote exchange server obviously works Is there a way I can do it ? thanksSolved93Views0likes1Commentchange the primary address (prefix) distribution list group
change the prefix on the primary address distribution list group how to bulk change primary smtp address distribution list group (before @ / prefix) with powershell? can use csv file? if possible, what is the csv format and how is the script? please help, thank you.Solved274Views0likes6CommentsM365 Exchange & Shared Mailbox Calendar Notifications
M365 Business Premium tenant here. We have a shared mailbox (not resource mailbox) called meetings@ The aim is to have an anonymous email address staff can send out meeting requests to our clients and have a dedicated calandar for those meetings. I've set up the staff members with Receive and SendAs permissions so everyone can set up meetings using that account so that the meeting invite appears to come from meetings@ instead of the staff members email address. Staff can create meetings and the invite is anonymous so that part is working as planned. The problem is, all the staff gets flooded with Accept/Decline messages going to their personal mailboxes. Is there a way to set it so that only the shared mailbox gets the notifications or even supress those messages entirely. I've resorted to email rules for each staff member to either block or divert the messages but I'd really prefer it if there was a one stop shop rahter than having to configure individual's mailboxes to block them. I tried Set-CalendarProcessing -Identity "email address removed for privacy reasons" -RemoveForwardedMeetingNotifications $true -AutomateProcessing AutoUpdate but it didn't seem to do much. Any other ideas?39Views0likes0Comments