Bulk Update Connected SharePoint Sites via powershell
Hello
Is there a way to Bulk Update Connected SharePoint Sites via powershell?
Yasser
Sure you can, call the following PSI method from PowerShell passing in the correct parameter values:
http://msdn.microsoft.com/en-us/library/office/gg206217(v=office.15).aspx
Paul
Paul Mather | Twitter |
http://pwmather.wordpress.com | CPS
Similar Messages
-
Permissions for connected SharePoint sites
hello forum members,
can someone please explain to me how do permissions work for connected SharePoint sites if Project Server set up to use Project permissons instead of SharePoint ?
Another question I have is that our environment was once set to use SharePoint permissions , then changed to use Project server permission mode. I checked on one user who could not login to Project Server and when i clicked on "Checked Permissions"
on a ribbon - it showed that this person had full rights, but when i went to check on Project security group - he was missing there. It was very confusing.
Does "Check Permissions" actually works when environment set up to use Project server mode permissions?
tatianaOn top of the very good Paul's explanation, here is what happens behind the scene:
case 1: you assign a resource to a project task, you save and publish project:
A hard coded job will parse assignment table and will put :
Project manager (MS office project synched) role to the project owner
Team member (MS office project synched) role to resources with assignments
In addition, 2 additional jobs will give suitable permissions to the resources part of security groups of PWA:
1 gives access to PWA site (to access my tasks, time sheets...)
the other one gives proper access to the resources who have dynamic rights(ie: if they are part of a PWA group that has a category, for instance, giving read to anyone who has Same RBS as project owner
Case2: you add a resource in PWA as part of a security group
1 job for PWA top site + 1 job for each project of server will give suitable rights to the new resource.
Case3: you change the permissions of an existing security group (more exactly to the category set to the group )
1 job for PWA site + 1 job by project will populate on each project site the new permissions. Mind to do that out of peak hours or you'll have a big slow down.
Case4: you add manually permissions directly in the project site. In this case one should never add people in an synched group or rights will Be overwritten during the next project publish.
note there are known bugs for large data set when many synch jobs stay in the queue: we can have jobs conflict and a general permissions loss. On top of that, a sync job including people whose active directory accounts are bad (having left the company
for instance) can block permissions syncs.... We demonstrated this fact to Microsoft and we are working on that with them...
hope this helps
Jeff -
Connected SharePoint Sites listing Projects eventhough "Do not create a site" is set
Hi
Is it normal to see a list of projects in the PWA > Server Settings > "Connected SharePoint Sites" eventhough we have configured the config settings to "Do not create a site"? Is it actually creating sites or is it just listing
the projects that are store in Project On-Line ?
Note, only the names of projects display no other fields in that table are populated?
\Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)Hello,
If no site URL is there it is normal, all project names are listed there regardless.
Paul
Paul Mather | Twitter |
http://pwmather.wordpress.com | CPS |
MVP | Downloads -
Import Files to SharePoint library via Powershell
Hi,
I'm a newbie to programming and I appreciate anybody who can help me out.
I need to be able to import files from a shared folder to a SharePoint document library on a scheduled basis. I prefer to do this via Powershell.
Here are the requirements:
1. Shared Folder is "D:\For_Upload". There's only one folder where all files for upload will be dumped. There are no subfolders.
2. The SharePoint Document library named "Invoice" is where the files will be uploaded. This library contains a list of folders pertaining to Invoice numbers (e.g. 5200004720, 5200004721, 5200004722, and so on.).
3. The documents to be uploaded will have a filename containing the Invoice number and year. The uploaded document should be dumped to a folder with its corresponding invoice number and year in the document library. If no year is specified in the filename
then it should automatically use the current year.
4. If the said document filename does not correspond to any invoice number in the document library folders, the document will be dumped to another shared folder labeled "D:\Not_Uploaded"
I appreciate anybody who can assist me with this.
Regards,
Territry these links:
http://stackoverflow.com/questions/22411014/sharepoint-script-to-automatically-import-documents-from-a-network-share-on-a-r
https://spfolderimport.codeplex.com/
https://camerondwyer.wordpress.com/2014/06/04/how-to-bulk-uploadcopy-a-folder-structure-and-files-to-sharepoint/ -
403 Forbidden Error while trying to access External SharePoint site Via Client Object Model
Hi,
I am accessing the External SharePoint site from an intranet. When I try to access local sharepoint site in my intranet via Client object model to upload few documents into a library, it works perfectly fine without any issues.
But when I try to do the same (upload few docs ) to an external SharePoint 2010 site out of my intranet from my intranet, I get 403, forbidden error. It looks like there is some issue with login credentials of this site. But when I try to navigate to the
site URL in Visual studio 2010, it asks for credentials and takes me to home page.
I supplied the credentials in different forms like
ctx.Credentials = new NetworkCredential("username", "password", "domain");
and
clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
and
FormsAuthenticationLoginInfo formsAuthInfo = new FormsAuthenticationLoginInfo("MyUser", "MyPassword");
clientContext.FormsAuthenticationLoginInfo = formsAuthInfo;
but nothing seems working and I get the Same 403 error. What am I missing here?
Thanks,
K.V.N.PAVANHi Pal,
Thanks for posting your query, Just try to add credentials to your clientContext object as mentioned below
NetworkCredential credentials =
new NetworkCredential("username", "pwd", "domain");
clientContext .Credentials = credentials;
or use
clientContext.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
I hope this will be helpful to you, If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog :http://sharepoint-community.net/profile/DharmendraSingh -
SCCM 2012: update client machine policy via powershell?
Hi,
Does SCCM 2012 R2 have powershell command built-in to trigger update actions of SCCM client (update machine policy etc)?
J.
Jan HoedtTo update client machine using Power Shell, you can check below link
http://blogg.alltomdeployment.se/2014/02/howto-force-remote-clients-to-update-their-sccm-clients-machine-policy-retrieval-evaluation-cycle-via-powershell/
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
Mai Ali | My blog: Technical | Twitter:
Mai Ali -
Custom HTML Master Page not updating when activating Feature via PowerShell
I created a WSP to deploy a HTML Master Page. I later have code that will publish this Master Page to create a .master, but I stripped this out just to simplify things. My issue is with the first step - getting the HTML Master Page file to
update by activating the feature using PowerShell. I don't understand why it's not working - I'm not even using this Master Page currently. Plus, oddly the master page does update if I go into the UI and deactivate/activate my feature.
I can easily reproduce this problem using the following steps:
1. Created a SharePoint Empty Project named SharePointProject1
2. Added a Module named Module1
3. Added a HTML Master Page called MyMaster.html and updated the elements.xml file for the Module1 with the following:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Module1" Url="_catalogs/masterPage/Test">
<File Path="Module1\MyMaster.html" Url="MyMaster.html" ReplaceContent="TRUE" Level="Published" Type="GhostableInLibrary">
<Property Name="Title" Value="My Master Page" />
<Property Name="MasterPageDescription" Value="My Master Page" />
<Property Name="UIVersion" Value=";#15;#" />
<Property Name="HtmlDesignAssociated" Value="TRUE" />
<Property Name="ContentType" Value="Html Master Page" />
</File>
</Module>
</Elements>
4. Deployed the WSP and activated the Feature containing Module1
5. Updated the HTML Master Page
6. Re-deployed the WSP
7. Deactivated the feature and Reactivated the feature using PowerShell
=> _catalogs/masterpage/test folder still has OLD file - Why??
$deployFeatureId = "575ec423-1b20-404c-8b2c-d160426c53e7"
Disable-SPFeature -Identity $deployFeatureId -Url
http://sp2013local -confirm:$false
Enable-SPFeature -Identity $deployFeatureId -Url
http://sp2013local
8. Deactivated the feature and Reactivated the feature through UI
=> _catalogs/masterpage/test folder now has the correct file
I even added event receiver code to delete the HTML file on deactivation but that still didn't work.Hi Sagar,
The second link isn't applicable for me because I'm not setting the Master Page for the site collection just yet. I'm just trying to get the version to be correct in the master page library first.
For the first link, I am trying to publish a Master Page, not a Page Layout. I did try adding some similar code that I found from this article,
http://www.eliostruyf.com/provision-your-html-designs-master-pages-page-layouts-to-sharepoint-2013/
but the same result. PowerShell is still copying an old version of the file to the Master Page Gallery, but the activating/deactivating the feature in the UI works fine.
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Module1" Url="_catalogs/masterPage/Test">
<File Path="Module1\MyMaster.html" Url="MyMaster.html" ReplaceContent="TRUE" Level="Draft" Type="GhostableInLibrary">
</File>
</Module>
</Elements>
public class Feature1EventReceiver : SPFeatureReceiver
public override void FeatureActivated(SPFeatureReceiverProperties properties)
SPSite site = (SPSite)properties.Feature.Parent;
PublishMasterPage(site, "/_catalogs/masterpage/Test/MyMaster.html");
public void PublishMasterPage(SPSite site, string filePath)
SPFile file = site.RootWeb.GetFile(filePath);
if (file.CheckOutType != SPFile.SPCheckOutType.None)
file.Item.Update();
else
file.CheckOut();
file.Item.Update();
file.CheckIn("Checked in by the branding deploy feature", SPCheckinType.MajorCheckIn);
if (file.DocumentLibrary.EnableModeration)
file.Approve("Approved by the branding deploy feature"); -
Setting up an additional central admin site via Powershell
Hi All,
If I join a farm via the config wizard UI, in advanced settings, I can choose if I want the server to also host Central Administration.
In powershell, how do I do the same thing when using connect-spconfigurationdatabase? Is it the New-SPCentralAdministration cmdlet?
ThanksTake a look at: http://www.harbar.net/articles/spca.aspx
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
How to access a sharepoint site via the REST API in Python?
I have the following site:
http://win-5a8pp4v402g/sharepoint_test/site_1/
When I access this from the browser, it prompts me for the username and password and then works fine. However I am trying to do the same using the REST API in Python. I am using the requests library, and this is what I have done:
import requests
from requests.auth import HTTPBasicAuth
USERNAME = "Administrator"
PASSWORD = "password"
response = requests.get("http://win-5a8pp4v402g/", auth=HTTPBasicAuth(USERNAME, PASSWORD))
print response.status_code
However I get a 401. I dont understand. What am I missing?Try adding the auhenticatig domain to the username. That may help.
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
Setting default value for lookup column in Sharepoint 2013 via powershell
Hi,
when I try to use the 2010 version of setting a default value to a lookup column ( colum.defaultvalue="1;#Open"), this is not longer supported in SharePoint 2013. The defaultvalue is always the alphabetically sorted first entry in the source
list.
How can I change this?
Thanks for any help.
LutzHi Lutz,
You can set the default value of a look-up column. The code is very simple, just need to take care of the code below.
$w = Get-SPWeb http://web
$l = $w.Lists["MyDocumentLibrary"]
$lf = $l.Fields["lookupColumn"]
$i = $l.Items[0] #List item to update
$lf.ParseAndSetValue($i,"1;#lookupvalue") #1;#lookupvalue refers to the ID of the lookup item and the value of the lookup item.
$i.Update()
As another example, if I wanted to update all the items in my document library that had the lookup value
Pending, with the lookup value Complete;
$w = Get-SPWeb http://myweb
$l = $w.Lists["MyDocumentLibrary"]
$lf = $l.Fields["lookupColumn"]
foreach($i in $l.Items)
if($i["lookupColumn"] -eq "1;#Pending")
$lf.ParseAndSetValue($i,"2;#Complete")
$i.Update()
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !! -
Where do the SharePoint components for Powershell come from?
I am just learning and I am trying out some scripts. As soon as I type in the Get-SPWeb command I get something like this.
PS C:\Windows\system32> $web = Get-SPWeb "https://xyz.sharepoint.com/"
The term 'Get-SPWeb' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:17
+ $web = Get-SPWeb <<<< "https://xyz.sharepoint.com/"
+ CategoryInfo : ObjectNotFound: (Get-SPWeb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Can someone please point me in the right direction?
Thanks
karlHi Karl,
If your workstation is on the same Active Directory domain as your SharePoint farm, you can also access SharePoint remotely via PowerShell remoting. You need to enable PowerShell remoting on your SharePoint servers and connect to them using PowerShell. Think
of this as SSH and running an interactive console remotely.
http://technet.microsoft.com/en-us/magazine/ff700227.aspx
Once you're in the PowerShell remoting session, you can load the SharePoint PowerShell modules as was suggested earlier.
Edwin Sarmiento SQL Server MVP | Microsoft Certified Master
Blog |
Twitter | LinkedIn
SQL Server High Availability and Disaster Recover Deep Dive Course -
Copying SharePoint Site Page between SharePoint Sites with the MasterPage and Correct PageLayout
Hi All,
I have created a page in the following SharePoint Site Using a Custom SharePoint MasterPage and a Custom PageLayout.
https://devrussellportal.prod.ds.russell.com/sites/emeasandbox/Data-Governance/Pages/DataGovernanceHome.aspx
In this site I have a Page called 'DataGovernanceHome.aspx' in that site. I need to copy this page with the MasterPage and the PageLayout that I have used to build this Site Page to https://russellportal.prod.ds.russell.com/sites/datagovernance/ Site.
The old site is a sub site but the new site is not s sub site. But both them are Publishing Sites.
I was able to copy the MasterPage with all styles and images without any errors and applied successfully to the new site. I exported the desired page from the old SharePoint Site and imported to the new SharePoint Site via SPD. But when I tried to open the
page it gave me an error 'Sorry, something went wrong'.
I even edit the
<mso:PublishingPageLayout msdt:dt="string">https://russellportal.prod.ds.russell.com/sites/datagovernance/_catalogs/Russell SharePoint 3 Column.aspx, Russell SharePoint 3 Column </mso:PublishingPageLayout>
tag by updating the new SharePoint Site URL also. But did not solve the matter. So what is I am missing in here? Could someone help me to solve this matter?
Thanks and regards,
ChiranthakaHello,
In your "something went wrong screen" you should see a correlation ID
please run you SharePoint management Shell with this command
get-splogevent | ?{$_Correlation -eq "<GUID>" }| select Area, Category, Level, EventID, Message | Format-List
Replacing the <GUID> by the correlation ID and give us the result
Best regards, Christopher.
Blog |
Mail
Please remember to click "Mark As Answer" if a post solves your problem or
"Vote As Helpful" if it was useful.
Why mark as answer? -
Copying SharePoint Page between SharePoint Sites with the MasterPage and Correct PageLayout
Hi All,
I have created a page in the following SharePoint Site Using a Custom SharePoint MasterPage and a Custom PageLayout.
https://devrussellportal.prod.ds.russell.com/sites/emeasandbox/Data-Governance/Pages/DataGovernanceHome.aspx
In this site I have a Page called 'DataGovernanceHome.aspx' in that site. I need to copy this page with the MasterPage and the PageLayout that I have used to build this Site Page to https://russellportal.prod.ds.russell.com/sites/datagovernance/ Site.
I was able to copy the MasterPage with all styles and images without any errors and applied successfully to the new site. I exported the desired page from the old SharePoint Site and imported to the new SharePoint Site via SPD. But when I tried to open the
page it gave me an error 'Sorry, something went wrong'.
I even edit the
<mso:PublishingPageLayout msdt:dt="string">https://russellportal.prod.ds.russell.com/sites/datagovernance/_catalogs/Russell SharePoint 3 Column.aspx, Russell SharePoint 3 Column </mso:PublishingPageLayout>
tag by updating the new SharePoint Site URL also. But did not solve the matter. So what is I am missing in here? Could someone help me to solve this matter?
Thanks and regards,
ChiranthakaHi,
Having moved the Master Page, Page Layout and other supporting branding assets successfully is a great first step.
So now you are attempting to move the content page. The content page itself is really a list item in the pages library. The aspects of a given content page are simply stored in site columns. When you copy the content page from one library to another using
SPD, I do not believe everything will transfer.
What you could try next is to open your source site in SPD. Navigate to the pages library and then detach your specific content page from its page layout (right click the content page to see this option). Now open this page in SPD to see all content.
Do the same thing in your destination site. First create a new content page in your destination site, then open SPD. Detach this content page from its page layout and now copy and paste the contents from source to destination. Save and see if the destination
content page loads. If it does, try reattaching the page layout on the destination site. As you noticed before, you may need to change a mso property to the new page layout location.
Another hiccup could be the specific web parts you added to the content page, but I can't say for sure. Possibly a webpart is attempting to access data it does not have access to?
All else fails, can you simply recreate the content page on the destination site from scratch, then copy content and add web parts in to effectively recreate the page by hand?
Eric Overfield - PixelMill -
ericoverfield.com -
@EricOverfield -
Managed property in a site collection (powershell - SharePoint online)
Link to my site collection -> https://web.domain.com/sites/SC/_layouts/15/listmanagedproperties.aspx?level=sitecol
when opening an url similar to this one and filter on a property name refinablestring00
What I need is to is to add a mapping to do is to add a mapping
Mappings to crawled properties
With powershell.
Assume that a full crawl has finished. That all crawled properties exist.
I want to add "ows_GoPro_x0020_Code" and I also want to change the Alias to "ProjectNumber"
What is the best way to do this via powershell for SharePoint 2013 online?
Do I need to build a sandboxed solution for this?HI,i would recommend run the PowerShell cmdlet to check if this website exists. Here are the detailed steps:
1. Set up the SharePoint Online Management Shell Windows PowerShell environment
http://technet.microsoft.com/en-us/library/fp161372.aspx
2. Run the command Get-SPOSite, it will return all site collections.
3. Check if the problematic public site collection is shown in the result. If it shows up, run another command to remove it. For example:
Remove-SPOSite -Identity https://expertsharepoint/sites/site1 -NoWait
This will remove the site collection named https://expertsharepoint/sites/site1 from the site collections list and moves it to the Recycle Bin.
4. Delete the site from the Recycle Bin:
Remove-SPODeletedSite -Identity https://expertsharepoint/sites/site1
Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/ -
Hi,
I have a SharePoint 2010 farm with two Web Applications.
For example:
https://contoso.domain.com
https://finance.domain.com
Both Webapp use https --> 443. Same valid certificate for both (*.domain.com)
I tested exporting an Excel library in https://contoso.domain.com.
It export and sync up sucessful the Excel library and it updates it OK.
However, once exported the Excel library in https://finance.domain.com, when
I try to syncronize or update the library I receive an error back, which indicates: "A connection to the SharePoint site cannot be established. To synchronize or
refresh your list, you must be able to connect to the SharePoint site". I had tested the WebDav (Map Network Drive) and the connection results OK.
Do you have any idea about this issue?? Why https://finance.domain.com do not
synchronize or refresh in excel o SharePoint site???
I had tested the security with IIS, SSL, WebDav.
Thank you,
GabyHi!!!
I solved this problem.
I created a new Application Web in the farm (https://project.domain.com), dismount content database the old application web ( https://finance.domain.com)
and the new application web (https://project.domain.com).
#New AppWeb project.domain.com
Get-SPContentDatabase -WebApplication https://project.domain.com | Dismount-SPContentDatabase -WhatIf
#Old AppWeb
Get-SPContentDatabase -WebApplication https://finance.domain.com | Dismount-SPContentDatabase -WhatIf
Mount the old content database to the new application web (https://project.domain.com).
Mount-SPContentDatabase "WSS_Content_Finance" -DatabaseServer "MyServer" -WebApplication https://project.domain.com
If you want to keep the same url, change the alternate access mappings.
Remember to change the bindings in IIS.
Hope you help the solution...
Gaby
Maybe you are looking for
-
Dynamically assign email submission target based on form content
We need to be able to assign the email target on a given form dynamically based on user selection out of a pre-defined set - drop-down. Currently, you can only target the submissions to an email manually entered into the email field or have a separa
-
Dso record get modified or overwrite after data uploaded
dear BI consultants ,. can any one answer this The record of view2 is already uploaded to target with one barcode number if we use the date as upload criteria. If the record from the view one is uploaded today with the same barcode number what happe
-
Dear Experts, I have a requirements explained below. I have writen a Z program with the selection screen, i need to execute the standard program RIMHIO00 (grid report)from Z Program by passing values to the selection screen of standard prog
-
CKMM for special stock.
Hi all, We plan to change price determination of materials from 2 to 3, new price control = S, using CKMM. I noticed that there is an option to choose special stock in part "Restrict Material Stock". I have searched SAP notes and found that this opti
-
White background before pushing play and then the menu comes up
After I drag the template and set the buttons, when I burn it and put the DVD in...the first thing that comes up is the a white background underneath the buttons. Then when I push play, my template background shows up before the movies starts.