New answers tagged

0

There are many ways we can handle this migration (700 GB) : With the combination of Azure VM and SPMT (SharePoint Migration Tool) to avoid the throttling issues. MSDN documentation is here : https://docs.microsoft.com/en-us/sharepointmigration/how-to-migrate-file-share-content-to-spo-using-azuredatabox If you have Metalogix Migration tool, do a sample ...


0

I am able to achieve this by running following script in PowerShell start "odopen://sync/?siteId=SiteID_HERE&webId=WebID_HERE&listId=ListID_HERE&userEmail=UserEmail_HERE&webUrl=WebURL_HERE" Earlier i was confused where to execute this by seeing start command. Later I understand that is part of PowerShell commands. One thing ...


0

For Site collection Top Visitor report I used work arround mentioned in below link https://social.technet.microsoft.com/Forums/en-US/e4d6d921-d1e1-4177-9c87-3c30ef30e7f5/site-collection-top-visitor-report-showing-only-2000-users


0

Try using below code: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Function Add-ColumnToListContentType() { ...


0

try the below code, $server = "CentralAdminUrl" $webAppName = "MyWebApp" $sd = 01/01/2015 $ed = 01/31/2015 $wc = New-Object System.Net.WebClient $wc.Credentials = [System.Net.CredentialCache]::DefaultCredentials $url = $server+ "/_layouts/WebAnalytics/Report.aspx?t=TopVisitorsReport&l=wa&id=https%3a%2f%2f"+$id+"%2f&WebAppName="+$...


0

This was a permissions issue. Create the $Session using an account that has Global Admin privileges in your O365 Tenant and you'll see that the 'Set-...' cmdlets automatically get downloaded and inserted into your session.


0

I was able to figure this out. Set DenyAndAddCustomizePages to false, run the code and if required, set it to true again.


0

Sometimes it happens that, when you create the Modern Site, it takes a while to configure all the security settings.


0

Here is the PowerShell code to get web analytics report in SharePoint 2010: #------------------------------------------------------------------------------------------- # Name: Get-WASummaryReport # Description: This script will get the Web Analytics Summary Report # Usage: Run the function with the required parameters # ...


0

$Site=Get-SPSite http://sitename foreach ($web in $site.AllWebs) { $siteUrl = $web.Url $siteName = $web.Title $siteUserCnt = $web.AllUsers.Count $siteusage = $site.Usage.Storage/1MB $Hits = $site.Usage.Hits $Created = [datetime]$web.Created $LastModified = $Web.LastItemModifiedDate $SnapShot = (get-...


0

If you have an older version of PnP-PowerShell, you may have to perform an update, but as of the February 2019 release, ConvertTo-PnPClientSidePage supports the switch parameter -CopyPageMetadata to do exactly that without need to write any additional code to loop through metadata values. https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/...


0

There are specific PnP PowerShell cmdlets for "ClientSide WebParts" (i.e. Modern WebParts). If you are trying to save modified json properties back to an existing WebPart, use Set-PnPClientSideWebPart, if you are creating a whole new webPart with those properties, use Add-PnPClientSideWebPart If you are trying to manipulate the JSON first in PowerShell ...


0

Some time ago we faced with this issue. Our programmer said that he didn't find a solution for it. I decide to write a little programm that open all sites in a browser and it is clicking "Trust It" automatically.


0

Use the below PowerShell coding : #Add PowerShell Module for SharePoint Online Import-Module Microsoft.Online.SharePoint.Powershell -DisableNameChecking   ##Configuration variables $SiteUrl = "https://crescent.sharepoint.com/" $LogoURL="/SiteAssets/Logo.png" #Existing file   Try {     #Get Credentials to connect     $Cred = Get-Credential     $...


0

Folks, the answer to this can be broken down into 2 solutions. I will go through each and will update this with code as I finalize the work. Solution 1: (Easy but cheesy) Use a worklfow with SPD. Which, on the surface sounds easy but requires some tweaking. Essentially once your form has been completed you will want to submit a blank version of the ...


0

since you mentioned private site i assume this is Modern Team Site with Private Group. To set logo for modern team site you need to use Set-PnPSite command and use -LogoFilePath parameter to set the logo Set-PnPWeb is used in case of Classic team site.


1

A Form Library is a specialized type of Document Library. Just like the Document Library, you cannot just call items.add() or list.addItem(), because you have to upload a file into the library before you have a listItem you can add metadata to. To upload a file, you would first need to have an IO Stream of some sort, either a FileStream if you are reading ...


0

use the below code, I just tested this in SharePoint 2013, Kindly update with the site url, list name, view name in the below code. Add-PSSnapin "Microsoft.SharePoint.PowerShell" $site = Get-SPSite "YOUR SITE URL" $web = $site.OpenWeb() $list = $web.Lists["YOUR LIST NAME"] foreach ($view in $list.Views) #Get all views in lists { if($view....


0

Here is the answer i needed: foreach ($names in $list.DefaultView.ViewFields) { $list.Fields.GetField($names).Title } Now I get only the title from columns of the default view.


0

If you are using PnP powershell you can use the below code, When using the Connect-PnPOnline cmdlet without any additional authentication parameters, we are prompted for username and password, which will not work if multi-factor authentication is enabled. We can use the following switch to show a web login for authentication which handles MFA. Connect-...


0

You can use SharePoint Online Management Shell to connect with multi-factor authentication (MFA) SharePoint Site. Follow below documentation: To connect with multi-factor authentication (MFA). OR Using UseWebLogin: Connect-PnPOnline -Url $siteUrl –UseWebLogin OR Using App Password: Also, you can use App password in place of normal password to login ...


0

You need enable publishing feature so SharePoint will create Pages library then the script could find the library. And $PageLayoutName is page layout file


1

You have to call the SaveChanges method of the WebPartManager. For example: $Webpart = $WebPartManager.WebParts | Where { $_.Title -eq $TitleofWebPart} $Webpart.ShowSortOptions = "False" $Webpart.ShowLanguageOptions = "False" $WebPartManager.SaveChanges($Webpart)


0

You could use PnP Powershell to delete the items in the library first then delete the library. Try this demo to delete items in the large library: $libraryName="doc" for ($i=1; $i -le 180000; $i++){ Remove-PnPListItem -List $libraryName -Identity $i -Force } Updated: Get-PnPListItem -List $libraryName -PageSize 10 -ScriptBlock { Param($items)} | % { ...


1

As long as you specify the -PageSize parameter set to some number under 5000, you can still use Get-PnPListItem with lists that have exceeded the list view threshold. You can obviously still specify the -Query parameter if you only want a subset of the list's items, but you still have to specify the -PageSize parameter if the list is too big. Then you can ...


1

You can try the below code: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Config Parameters $SiteURL= "https:...


1

Try using below: $list.fields | select Title, InternalName, StaticName References: SharePoint–Finding Column Display and Internal Names. Get List Fields in SharePoint using PowerShell.


1

No you cannot type cast a text field as date in caml query. You can create BillingDate_2 column and using powershell you can convert the BillingDate values to date Time and fill it into BillngDate_2 and then you can query on the BillingDate_2, but any new items added will not have BillingDate_2 values. Another approach is to fetch all the values from the ...


0

that is only doable in sharepoint on premises, here is an explanation for programmatically setting up the document set default view on a list => If you want a workaround for sharepoint online, please use this powershell docset welcomepage view setter and follow this example


Top 50 recent answers are included