New answers tagged

0

The best approach in time and effort is used CSOM PowerShell commands or PnP PowerShell commands. This commands are different from the SharePoint Command PowerShell but you can run lot of administration commands and much more.


0

Chances are that $docSetobject.context is not the same as $context. You cannot mix them. On top of that, you don't really need to pass $context to your functions. It's already available in your $docSetobject object. via $docSetobject.context. Make sure you use correct context this way function SetPermissionsToDocSet { param($docSetobject, $groupName, $...


1

As per the official documentation below: Get-PnPList Returns a List Object And outputs Microsoft.SharePoint.Client.List So instead of using it as a string try using its return type you get. You can also get the type returned from Get-PnPList, using: $list.GetType().FullName


0

Could you please offer a screenshot about your modern page when you click Gear Menu? Per my test, in modern team site, when i click Gear Menu->Change the look->Theme->I will get the theme like the following:


0

The themes and screens you have displayed are only for the Classic UI. (I.e. they only work with Master Pages.) Modern UI themes really have nothing in common with Classic themes. https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-theming/sharepoint-site-theming-overview https://docs.microsoft.com/en-us/sharepoint/dev/...


0

Please check the following: 1.Try to not add any filters in the cmdlet, see if it works. like this: Merge-SPLogFile -Path D:\Log.log -Overwrite 2.Instead of just asking for the Correlation ID, provide a date filter, the narrower the time span is, the faster it will execute: Merge-SPLogFile -Path D:\Log.log -Correlation "2816f89e-8451-7054-1584-...


0

Your CAML query is invalid. In your example, you are trying to add 3 child elements to the And tag, while it only can have two. It means you are missing one more < And > tag: Instead of this <View> <Query> <Where> <And> <Eq> <FieldRef Name='Title'/> ...


0

I don't know if there's another way to do this, but to get unstuck and do what I needed to do, I did the following: Forked the https://github.com/SharePoint/PnP-Sites-Core repo Created a new method in /Core/OfficeDevPnP/AuthenticationManager.cs based on GetWebLoginClientContext() that instead returns a ProjectContext instead of a ClientContext (obviously ...


0

And MS fixed it :-) SP-admin center now features "Bulk Edit" on active sites.


0

Ran into the same issue a few days ago. What worked for me was deleting the entire "SharePointPnPPowerShellOnline" folder and then installing the module again using Install-Module SharePointPnPPowerShellOnline


0

Looks like SharePoint sometimes throws intermittent error about the push notifications feature. Due to that, looks like your code isn't working as expected even though it is correct. To fix that issue, you can enable the Push Notifications feature as below and then execute your code: Enable-PnPFeature -Identity 41e1d4bf-b1a2-47f7-ab80-d5d6cbba3092 ...


1

There are a few ways to do this in PowerShell (on the SharePoint box). All of the below examples will result with https://teams.SharePoint.com/sites/site The best way is to call the Root Site Collection's Web: $web = Get-SPWeb "https://teams.SharePoint.com/sites/site/communities/subsite" $web.Site You can try calling the Parent Web for each web (not as ...


0

I tested the code snippet below for "CR_Temporary" list and Item Id "1": Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll' $site = 'http://sp/sites/dev' $context = New-Object Microsoft.SharePoint.Client.ClientContext($site) $web = $context.web $list = $web.Lists.GetByTitle("...


1

Start Updating your workflow association after setting: $association.AllowAsyncManualStart = $true $association.AllowManual = $true Using: $list.UpdateWorkflowAssociation($association) Or $list.WorkflowAssociations.Update($association) About StartWorkFlow() Method: The boolean parameter shows the property isAutoStart. This method comes with two ...


1

Powershell: Either cast to an [uri] type and (re-)assemble the parts > [uri]"https://teams.SharePoint.com/sites/site/communities/subsite" AbsolutePath : /sites/site/communities/subsite AbsoluteUri : https://teams.sharepoint.com/sites/site/communities/subsite LocalPath : /sites/site/communities/subsite Authority : teams.sharepoint.com ...


0

I found that the following line of code works for me In Power Shell after a ton of work $F.Properties["ContentTypeId"]=$ProjectFolder.Id.ToString() $F is the folder from $Web.GetFolder. $ProjectFolder is the new ContentType Full code below. Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue Start-SPAssignment –Global $Site = "http://...


0

You site Url is not right in the PowerShell, the following PowerShell script for your reference. #region Variables $Username = "user@tenant.onmicrosoft.com" $Password = "password" $siteURL = "https://tenant.sharepoint.com/sites/TestCommnew1" #endregion Variables #region Credentials [SecureString]$SecurePass = ConvertTo-SecureString $Password -...


0

You can loop all files in the library, use IF condition to identify the column's value. If the column value of an item contains "Red", move the file into the related folder, and so on. There are some similar topics for your reference: Moving files between folders in the same Document library - powershell Managing SharePoint Online Files with PowerShell ...


0

Sample demo by CSOM PowerShell. $url="http://sp" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll" $clientContext = New-Object Microsoft....


0

We do have method on TermSet object to getTerm based on GUID. TermSet.GetTerm(Guid) Method - Gets a Term from the current TermSet based on its ID. https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.taxonomy.termset.getterm Below code snippet from ref link -https://seyedketabchi.wordpress.com/2011/03/27/accessing-taxonomies-from-powershell/ $...


0

I've got the same problem and solved doing: Retract and then Remove of the wsp from: Central Administration–>System Settings–> Manage farm solutions. Then, from Powershell, I have canceled the Features with null scope (which were preventing me to install again the package succesfully): Get-SPFeature | ? { $_.Scope -eq $null } $feature = Get-SPFeature | ? {...


1

The following PowerShell script for your reference. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get the Web $web=Get-SPWeb "http://sp2013/sites/team" #Get the List/Library $list=$web.Lists.TryGetList("Library") [System.Array]$Words = 'Project Overview','Project from pervious Years' foreach($folder in $list.RootFolder....


-1

The solution “disable e374875e-06b6-11e0-b0fa-57f5dfd72085 feature” is for SharePoint on-premise not for SharePoint online. To troubleshoot the issue, check things below: Check if there are the lookup column and the calculated column in the current list. And check if the lookup column and calculated column are correct in the current list. Turn on the “...


0

Try below. Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll") Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll") Function Get-SPOContext([string]$Url,[string]$UserName,$...


Top 50 recent answers are included