Skip to main content

Posts

Showing posts from July, 2023

Basic of PowerShell-Part2

Basic of PowerShell-Part2 PowerShell has amazing capability to extract the data into excel sheet, read the txt file,  filter the data and convert the data into the table. By using these capabilities, "How can read the content and apply the filter on it" and "convert the data into table" these are the basic queries which today we will discuss in the blog in layman language by taken examples. this is part two of the Basic Of PowerShell series.   "How can read the content and apply the filter on it"- Here, Let us take an example “.t xt file has five company names which are like Infosys, Wipro, HCL, TCS and MPG. Apply the filter that is only fetch the record that is ‘Wipro’  ”. Before Writing the script, We must think about the basic commands which we will use. 1-       Get-Content – This command is used to read the data for a txt file .  2-      Pipeline Operator ‘|’ - it will be used to run the multiple command in t...

Copy-PnPFolder: The Remote Server Returned an Error: (404) Not Found.

Error Statement-  Trying to  Copy SharePoint Document Library folder from Site to another site by using PnP Command as mentioned below- Connect-PnPOnline  https://tenantname1.sharepoint.com/ $sourceurl=   "Documents/MyProjectfiles" $targeturl=  "https://tenantname2.sharepoint.com /sites/otherproject/Shared Documents" Copy-PnPFolder -SourceUrl $sourceurl -TargetUrl $targeturl -Overwrite Run the script but getting below given error. Copy-PnPFolder: The Remote Server Returned an Error: (404) Not Found. Solution- In above script, Source URL is of tenantname1 and target URL is of tenantname2.  In SharePoint Online, Data can not be copied between two tenant.  Copy-PnPFolder can copy data in  same site, same site collection, or even in different site collection in same tenant. That's why command is return error.