powershell
19 TopicsObtain Deleted Stats (SharePoint) by Retention Policy
I've scoured: Identify the available PowerShell cmdlets for retention | Microsoft Learn and the Unified Audit Log (Using Search-UnifiedAuditLog in Powershell: All You Need To Know, How to Query Microsoft 365 Audit Logs using PowerShell – TheITBros) to see if I can come up with a method to obtain some statistics regarding how many files and space (storage) has been freed up with the use of retention policies being enabled. I'm drawing a blank. In an ideal world, I'd like know how many files have been deleted by the system (the system enforcing a 5 Year from last modified Date and Delete Policy) for the last year or 6 month intervals. If possible the corresponding volume of storage space recovered from these deletions. Any ideas?87Views0likes2CommentsSelfeServe License Request Administation
Hello Microsoft Community! In our Org , using the powershell module MSCommerce, we have already set the AllowSelfServicePurchase policy to Disabled for all products as we do not want our Members to purchase licenses or sign up for trials on their own. This has not stopped our Members from making requests for licenses. We'd like to have our Members utilize our established process for requesting licenses vs using SelfServe. Is it possible to stop this altogether vs only being able to disable the purchasing function? Here is an example of our policy status and the weekly digest email we just received.Solved669Views0likes3CommentsUnable to Remove-SPOUser from personal sharepoints properly
Hello, I had to add a global administrator account literally on every single personal sharepoint, as Site Collection Administrators, to delete a user from each personal sharepoint, with a certain email but associated with a old sharepoint ID (the user was re-added to our Office 365 and he had issues when other were sharing links from personal sharepoint to him, access denied even with the right email, because he have now other sharepoint ID). Now I want to remove that global administrator account from every personal sharepoint (using: Remove-SPOUser) , using a global administrator account A to remove the global administrator account B that I've added everywhere (Account B was added with Account A login with: Set-SPOUser)(otherwise will get: Remove-SPOUser : A user may not remove his or her own account from a site collection.), but cannot do that because, seems like I need to use an account that is already a Site Collection Administrator, to perform this action, so I am unable to leave just the Primary Site Collection Administrator (the own user). Over web sharepoint admin center, I can remove and add everyone using Account A, even remove Account A from Site Collection Administrators, it simply doesn't work in the same way when connected over Connect-SPOService. Please advise how can I remove that Account B, and leave only the Primary Site Collection Administrator as Site Collection Administrator?578Views0likes1CommentCan't change PasswordExpirationPolicy of all users with Update-MgUser
Hello, Ive got into a problem where we disabled Password expiration in the GUI but some account keep having it enabled when you look with Powershell. Microsoft provides a guide where they explain hot to set all users policy to never expire, sadly it doesn't work, I've tried it in several Tenants already. Here is the link to the guide: https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/set-password-to-never-expire?view=o365-worldwide The command: Get-MGuser -All | Update-MgUser -PasswordPolicies DisablePasswordExpiration The error when the command is used: Update-MgUser_UpdateViaIdentityExpanded: The pipeline has been stopped. Exception: InputObject has null value for InputObject.UserId I know that you should set a UserID as a scope for it to work, but this isn't possible as far as I know on update-mguser. Please help me find a solution to update everyone's PasswordExpirationPolicy to never expire. I was thinking about creating a script that goes through every userid and performs the action, but my knowledge isn't as advanced to create it.Solved732Views0likes1CommentCannot create Information Barrier Policy
Hi, I have created two segments within Information Barriers in Microsoft Purview. I have then tried to create a Policy that blocks one segment from the other using both the UI and PowerShell, but I get the same error every time. "Could not run the command New-InformationBarrierPolicy. Cause of the problem: The parameter(s) ModerationAllowed of the cmdlet New-ExoInformationBarrierPolicy is not allowed for the app 00000007-0000-0ff1-ce00-000000000000" Am I missing something? Is anyone else seeing this, or is it just me? Right now, I can create many policies at all.Solved1.6KViews0likes4CommentsAzure automation account script error
Hi I have an azure automation account and all runbooks are failing. I don't know why. As a test I only ran this command, and it fails too. $cred = Get-AutomationPSCredential -Name "Name" Import-Module ExchangeOnlineManagement Connect-ExchangeOnline -Credential $cred This is the job Exception log: Connecting to remote server outlook.office365.com failed with the following error message : Bad Request For more information, see the about_Remote_Troubleshooting Help topic. (Connecting to remote server outlook.office365.com failed with the following error message : Bad Request For more information, see the about_Remote_Troubleshooting Help topic.) Any ideasSolved1.4KViews0likes3CommentsHow to manage unmanaged Lists (My Lists)?
Hi all, Lists can be stored in two locations: - SharePoint Site - My Lists In this question I am talking about My Lists. As far as I understand My Lists are stored in the specific OneDrive of the user. Scenario: A huge, heavily used List is stored in My Lists (I know this is not how it is supposed to be) and the creator of the List leaves the company. How do I manage this unmanged List? In Forms there is a process a Global Admin can use to get back the control. But for Lists I didn't find something so far.Solved779Views0likes2CommentsLoop parameters missing after PowerShell update
I'm trying to give a few users access to the new Loop collaboration platform and I'm getting stuck trying to update SharePoint parameters so that file sharing can be enabled in Teams and SharePoint. I have updated to the most recent version of the Management Shell for SharePoint Online. When I run the command Get-SPOTenant, I don't see the IsLoopEnabled or IsWBFluidEnabled parameters. Our SharePoint Online version is 16.0.0.23508 Any suggestions would be appreciated.773Views0likes0Comments