Forum Widgets
Latest Discussions
PowerShell 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 Contributor9Views0likes0CommentsInternal 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 Contributor19Views0likes1CommentBulk 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 }13Views0likes0CommentsHyper-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 Contributor47Views0likes1Commentfind 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 Contributor8Views0likes0CommentsUnable to update help in MS PowerShell
Dear community, I have just started learning Microsoft PowerShell, so I apologize in advance in case my problem turns out to be too trivial. I have Windows 10 (Version 10.0.15063) installed on my virtual machine. PSVersion 5.1.15063.0 When trying to run Update-Help (in Administrator privilege) the process finished with multiple errors. PS C:\> Update-Help Update-Help : Failed to update Help for the module(s) "AppBackgroundTask, AppvClient, AssignedAccess, BitsTransfer, CimCmdlets, Defender, DnsClient, iSCSI, ISE, Microsoft.PowerShell.Archive, Microsoft.PowerShell.Core, Microsoft.PowerShell.Diagnostics, Microsoft.PowerShell.Host, Microsoft.PowerShell.LocalAccounts, Microsoft.PowerShell.Management, Microsoft.PowerShell.ODataUtils, Microsoft.PowerShell.Operation.Validation, Microsoft.PowerShell.Security, Microsoft.PowerShell.Utility, Microsoft.WSMan.Management, NetAdapter, NetEventPacketCapture, NetLbfo, NetNat, NetQos, NetSwitchTeam, NetTCPIP, PackageManagement, PowerShellGet, PSReadline, PSScheduledJob, PSWorkflow, PSWorkflowUtility, ScheduledTasks, Storage, TLS, UEV, WindowsDeveloper License, WindowsErrorReporting, WindowsSearch" with UI culture(s) {ru-RU}: Unable to connect to Help content. The server on which Help content is stored might not be available. Verify that the server is available, or wait until the server is back online, and then try the command again. At line:1 char:1 + Update-Help + ~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Update-Help], Exception + FullyQualifiedErrorId : UnableToConnect,Microsoft.PowerShell.Commands.UpdateHelpCommand Update-Help : Failed to update Help for the module(s) "PSDesiredStateConfiguration, VpnClient" with UI culture(s) {ru-RU}: Unable to retrieve the HelpInfo XML file for UI culture en-US. Make sure the HelpInfoUri property in the module manifest is valid or check your network connection and then try the command again. At line:1 char:1 + Update-Help + ~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [Update-Help], Exception + FullyQualifiedErrorId : UnableToRetrieveHelpInfoXml,Microsoft.PowerShell.Commands.UpdateHelpCommand I would be extremely grateful if anyone could help me deal with this issue!MargaretSpace24Dec 21, 2024Copper Contributor94Views0likes2CommentsAccess denied when I want create to File in Powershell
Hi, Please, your help me! I have problem to access denied, when i want create to file. I have the account in the group administrator. I valued the permission in the tab security and i have administrator permission. PS U:\> $cre | Export-Clixml -Path C:\ Export-Clixml : Acceso denegado a la ruta de acceso 'C:\'. En línea: 1 Carácter: 8 + $cre | Export-Clixml -Path C:\ + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (:) [Export-Clixml], UnauthorizedAccessException + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ExportClixmlCommand Regards. #PowerShellSolveddaranguaDec 19, 2024Copper Contributor63KViews1like7Comments
Resources
Tags
- Windows PowerShell1,134 Topics
- powershell335 Topics
- office 365269 Topics
- Azure Active Directory136 Topics
- Windows Server127 Topics
- SharePoint125 Topics
- windows96 Topics
- azure92 Topics
- exchange87 Topics
- Community54 Topics