Forum Widgets
Latest Discussions
External Access Policy - CsExternalAccessPolicy e CsTenantFederationConfiguration (PowerShell)
Hello, community. We are trying to enable functionality regarding the creation of external access policies using the New-CsExternalAccessPolicy (CommunicationWithExternalOrgs) and Set-CsTenantFederationConfiguration (CustomizeFederation) commands. However, we are receiving the following error: Set-CsTenantFederationConfiguration : Customize Federation is not allowed to enable in your tenant. In line:1 character:1 + Set-CsTenantFederationConfiguration -CustomizeFederation $true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ({ ConfigType = ...Configuration }:<>f__AnonymousType104`5) [Set-CsTenantFederationConfiguration], Exception + FullyQualifiedErrorId : ClientError,Microsoft.Teams.ConfigApi.Cmdlets.SetCsTenantFederationConfiguration Is it necessary to do something first? We are following the documentation below: https://learn.microsoft.com/en-us/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings TKS!rrdrummond88Jan 15, 2025Occasional Reader10Views0likes0CommentsHelp In Editing Data Source Credentials in PowerShell for Power BI Embedded Dashboards in D365 CRM
Hello, We are currently migrating Power BI embedded dashboards from one Dynamics 365 CRM tenant to another. The process involves creating a new Power BI report within a workspace. Since the Dynamics 365 Solution does not support the inclusion of Power BI reports within unmanaged solutions, we have resorted to using PowerShell scripting to manage the migration. During this migration, we encountered an issue where the report IDs from the original environment remained linked when moving the Power BI embedded dashboards to the new environment. To address this, we have utilized Environment Variables to map the new report and workspace IDs appropriately. However, we are facing an issue when attempting to edit the Data Source Credentials using PowerShell scripting. Specifically, we are receiving a "Bad Request" error, as shown in the screenshot below. Here is the PowerShell code we are currently using to edit the Data Source Credentials: Connect-PowerBIServiceAccount $accesstoken = Get-PowerBIAccessToken $patchBody = '"credentialDetails": { "credentials": {"accessToken":"'+$($accesstoken)+'"}, "encryptedConnection": "Encrypted", "encryptionAlgorithm": "None", "privacyLevel": "Organizational", "useEndUserOAuth2Credentials": true }' Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/gateways/9eaed562-e9c2-46e4-91cf-276ed0947b41/datasources/f1181856-de29-4a9a-a555-a0e181cd7898" -Method Patch -Body $patchBody We would greatly appreciate any guidance or suggestions on resolving this error in the PowerShell scripting process for updating the Data Source Credentials. Thanks! Inogic Professional Services: Power Platform/Dynamics 365 CRM An expert technical extension for your techno-functional business needs Drop an email at email address removed for privacy reasons Service: https://www.inogic.com/services/ Tips and Tricks: https://www.inogic.com/blog/13Views0likes0CommentsPowerShell 7.4 SharePoint Question
Hi everyone, I’m seeking assistance with constructing a PowerShell script to manage document versions and space on multiple SharePoint sites. My goal is to: Connect to various SharePoint sites. Delete older copies of documents to free up space. Update version history settings to ensure future document control. Pull the list of SharePoint sites from a CSV file to handle multiple sites at once. Produce a log at the end of the script execution. I’ve encountered challenges with consistent authentication methods, having tried PnP PowerShell and SharePoint REST API. I would appreciate guidance on the best approach for handling credentials and login within the script. Any advice or examples would be greatly appreciated! Thank you in advance for your help.MatthewLottsJan 10, 2025Copper Contributor11Views0likes0CommentsInternal 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!JasonPPFJan 09, 2025Copper Contributor22Views0likes1CommentBulk update Azure AD with user attributes from CSV
I am looking for a way to update user attributes (OfficePhone and Department) for about 500 users from a CSV to AzureAD using a powershell. Does anyone know of a script that I could use? I am new here and if I have not given enough information, please let me know. I tried using Set-AzureADUser piping records using a foreach statement from a csv that I imported, but it was throwing up errors. Thanks! JacobSolvedjebujohnJan 08, 2025Copper Contributor195KViews4likes71CommentsAdding External Users in-bulk to: Microsoft Teams & Private Channel(s) within the Team
We have a customer who requires over 350 external users (their customers) to be added / invited into a Team which has been created. "Half" of the users need to be added into "private channel a", and the other "Half" need to be added into "private channel b". We have attempted to add the users via various PowerShell scripts, however none of these scripts that we have been provided with have worked for various reasons. I have been unable to locate any native methods for this within the MS 365 admin centre, therefore believe that the only way to achieve this is by PowerShell scripting. Example of the most recent script we have is as follows, omitting the creation of the private channel(s) as they have already been created - see below: We require assistance with the actual script itself to: Add users into the team from a CSV of their email addresses. Assign the users to the correct private channel. Note - users will be added in 2 batches - 1 per private channel, so we just require scripting that can be modified to achieve this. # Install the Microsoft Teams PowerShell Module Install-Module -Name PowerShellGet -Force -AllowClobber Install-Module -Name MicrosoftTeams -Force -AllowClobber # Connect to Microsoft Teams Connect-MicrosoftTeams # Define the team name and path to the CSV file $teamName = "Your Team Name" $csvPath = "C:\path\to\your\users.csv" # Get the GroupId of the team $team = Get-Team -DisplayName $teamName $groupId = $team.GroupId # Import users from the CSV file $users = Import-Csv $csvPath # Add external users to the team foreach ($user in $users) { Add-TeamUser -GroupId $groupId -User $user.Email } # Define the private channel name $privateChannelName = "Private Channel Name" # Create the private channel New-TeamChannel -GroupId $groupId -DisplayName $privateChannelName -MembershipType Private # Get the ChannelId of the private channel $channel = Get-TeamChannel -GroupId $groupId -DisplayName $privateChannelName $channelId = $channel.Id # Add users to the private channel foreach ($user in $users) { Add-TeamChannelUser -GroupId $groupId -User $user.Email -ChannelId $channelId }17Views0likes0CommentsHyper-V orphaned or unnecceasry file script
I am trying to create a script that I can run against a Hyper-V cluster or host that can scan and identify orphaned files or files that are unused. THe idea is to clean up a cluster that has a lot of messy files because of migrations, or failed backups, snapshots, etc.JNichk323Jan 03, 2025Copper Contributor34Views0likes3CommentsHow 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!VojtechBJan 01, 2025Copper Contributor9Views0likes0CommentsMicrosoft Purview (DLP Policy via PowerShell)
Hello, I created a DLP policy within Microsoft Purview centered around Microsoft teams to block external users outside of my organization from sending/receiving sensitive data over teams, but the condition was set to block everyone per my PowerShell script. Any suggestions would be helpful. I want the condition/action to block those individuals outside of my organization not everyone. Which script would be appropriate to block only people outside of my organization. I tried several forums, but I still can't get the script to switch from everyone to block only people ouside of my organization.miaebDec 30, 2024Copper Contributor49Views0likes1Commentfind the azure vm status in multiple subscription
We have multiple subscription (more than 10) in our environment and MFA enabled , I was trying to find one vm status using the name but its not working , setting azcontext with tenant ID also not working , I need command to set all subscription as context and find the vm status or any other way to find the vm status , this is needed for daily work, appreciate someone help on this .Sean145Dec 24, 2024Copper Contributor8Views0likes0Comments
Resources
Tags
- Windows PowerShell1,136 Topics
- powershell335 Topics
- office 365269 Topics
- Azure Active Directory136 Topics
- Windows Server127 Topics
- sharepoint125 Topics
- windows96 Topics
- azure92 Topics
- exchange87 Topics
- Community54 Topics