Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both ...

learn more… | top users | synonyms (1)

4
votes
2answers
58 views

Export-SPWeb List with spaces in list name

I am trying to backup a list and am getting the error Export-SPWeb : Cannot find an SPWeb object with Id or Url . I'm guessing this is related to the space in the list name. I've tried this ...
0
votes
1answer
36 views

SPCheckinType.OverwriteCheckIn in Poweshell

How we can OverwriteCheckIn in Powershell? Please correct second parameter? $ListItems[$i].File.CheckIn("Checkin automatically",SPCheckinType.OverwriteCheckIn) // second parameter seems wrong
1
vote
0answers
46 views

Error in Powershell with .recycle() method

With the following code, I am getting this error in powershell: I could not find out whats wrong here? I am using recycle() method because in next step, i need to restore items from recycle bin. ...
2
votes
2answers
34 views

How to specify start method in Powershell

I have written a powershell script with couple of methods. I want to start powershell script with some specific method,for example the script should start with method Get-SitesWithNewsPageCT() How I ...
1
vote
1answer
27 views

How to get current Web object from collection

In the code below, I want to pass current web object to function Remove-CT(), How I do that? site | Get-SPWeb -Limit all | ForEach-Object { $currentWeb = $_.SPWeb // please correct this line if ...
2
votes
1answer
81 views

Do we have Secondary SiteCollection Administrator in SharePoint Online?

Do we have Secondary SiteCollection Administrator in SharePoint Online site? Because when I create new Site Collection, I don't see Secondary administrator listed in the form. Also in other posts ...
0
votes
1answer
22 views

User profile service issues

I had this question earlier but did not find any solution. My user profile service synchronization is not starting. I tried stopping the service and restarted it also but no luck. Is deleting the user ...
0
votes
2answers
24 views

Deleting User profile service and recreating it

If I delete the User Profile Service Application from the central administration, will that create an issue for user using SharePoint. I am trying to delete that and recreate again since the User ...
3
votes
3answers
37 views

How do I create a WebPartPage using PowerShell?

I need to learn a PS script to create a WebPart Page on any library I want in my Sharepoint 2010 site. Im brand new to PowerShell and Sharepoint, so far all I know is the little tought on a few MVAs ...
0
votes
1answer
27 views

How to iterate each User Profile with Powershell

I've trying to iterate each User Profile with this snippet but at the following step: write-host "Job Description for user" $User " is : " $up[$upAttribute].Value the code always return the ...
0
votes
1answer
38 views

How to recover List Items from Recycle bin using Powershell by having item Guid

With following code I have recycled list items and have stored item GUID in $DeletedItem: for($i=$ListItems.Count-1; $i -ge 0; $i--) { write-host "Deleted List Item with ...
0
votes
2answers
48 views

Upload files to Sharepoint using Powershell and FSRM

I am trying to upload a bunch of files to a SharePoint server. But I want to set the file-metadata before uploading so that it matches with SharePoint property and buckets it. Need help in setting ...
0
votes
1answer
20 views

Create document sets in powershell from xlsx (not csv) file

On occasion we have a need to create multiple document sets in a single library. In the past I have always put the details (e.g. name and any other column values) into a csv file and used powershell ...
4
votes
2answers
92 views

Deleting Content type from “List Items” using Powershell

I want to delete a custom content type from all items that are using that content type in a list/library. Is that possible using powershell? if yes, then I want to know after deleting CT, which ...
0
votes
1answer
63 views

how to get all the pages inside a site?

How to get all the pages inside a site? I will pass the parameter of a site in a site collection example: http://www.category.com/en,using powershell code in sharepoint server 2013. when i try below ...
1
vote
1answer
30 views

Power shell health check up in sharepoint 2013

How to test the health check up for all the site collection under the webappplication in sharepoint 2013 using Powershell.
2
votes
2answers
69 views

Get all links in a site and all subsites using Powershell [duplicate]

We have a public facing site www.productsMainsite.com is our main web application i need only pages and sites information for a site under a web application, for example: ...
2
votes
0answers
27 views

Removing Items from Recycle Bin that uses specific Content types

I want to delete custom content type from Pages library but it did not allow me to delete and says "content type is still in use". Then i get to know that i need to delete it from following locations ...
0
votes
2answers
32 views

Sharepoint list deleting from powershell

I have got a Sharepoint list. I updeted it in job everyday and everyday refresh by powershell. I have got some column on this sharepoint list. One of this column called [nazwazdarzenia]. And the code ...
1
vote
1answer
22 views

getting Pages library from given URL

I have a URL for subsite mynews: for example: http://something.good/news/mynews I want to add custom content type 'NewsCT' to Pages library of this mynews subsite using powershell. How I do that?
1
vote
1answer
53 views

How to refresh all sub-sites in a site collection using Powershell

I have some bug on pages that uses custom Content type. I have fixed that bug by just 1). removing that custom content type from pages library, 2). Refreshes the page and then 3). By adding the same ...
2
votes
3answers
191 views

Set default value of Article Start Date to [Today] with CSOM

I'm struggeling with setting the default value of ArticleStartDate date-time column using PowerShell and CSOM. Bakground: I have a content type, used by a page layout, inheriting from Article Page ...
0
votes
0answers
80 views

Exception Message: Exception calling “ExecuteQuery” with “0” argument(s): “Error=Value=InvalidArgument”

I'm new to Sharepoint Online and Powershell. I tried to convert this example from https://msdn.microsoft.com/EN-US/library/office/microsoft.sharepoint.client.file.startupload.aspx to run with ...
2
votes
0answers
38 views

Iterate through subfolder in list via CAML & Powershell

I have a need to remove unique permissions on documents in a list, however the list is over 5000 items so the following won't work, and its SharePoint Online so I can't change the threshold. ...
1
vote
1answer
26 views

Full URL for Task in a list via powershell

I need to extract the full URL for a 'task' in a 'task list' via a PowerShell script. My goal here is to extract this URL, report on it and the end user can click on the URL and it would take him ...
0
votes
2answers
50 views

PowerShell Set WebApplication Timeout

How do you change the SPWebApplication Web Page Security Validation timeout via PowerShell. I want to set this upon creating a web application during the creation of a farm, but I'm happy running a ...
0
votes
0answers
13 views

How can I mass update the format of a collection of subsites?

I have a SharePoint 2010 site with around 200 subsites in it. Management wants to uniform ALL the subsites so that they're in a certain layout. What's the best way to make this happen? The 2 ...
0
votes
0answers
31 views

How to loop sharepoint document library subfolders with powershell in CSOM

I have this code: cls function Recurse ($folder){ write-host ----- $folder.Name $context.Load($folder.Subfolders) $context.ExecuteQuery() foreach($folder in $folder.Subfolders) ...
1
vote
1answer
30 views

Wait for retraction of each WSP before proceeding with the next in PowerShell

I am trying to create a PowerShell script for Adding and Deploying WSPs. I have multiple WSPs. Initially, I have to Retract and Remove existing WSPs, before I Add and Deploy them. As we know, the ...
0
votes
0answers
17 views

Get-SPSiteSubscriptions belonging to a specific Web Application

I have 2 Web Applications in my On-Premise SharePoint farm configured for Multi-Tenancy. Each web application contains a list of Tenants. When I execute Get-SPSiteSubscriptions in PowerShell, I get ...
1
vote
0answers
27 views

Powershell Migration script 2013 on prem to Office 365

I am building an on prem sp2013 intranet with the option of putting it in the cloud in the future. What I am thinking is writing some powershell script to add the pagelayouts change the welcome page ...
7
votes
2answers
250 views

Setting PropertyBag values in SharePoint Online

I am trying to set some property bag values in SharePoint Online, specifically around SharePoint Designer access. The code below runs without error, but I do not see the propertybag value being ...
1
vote
2answers
33 views

Create SharePoint groups with powershell

Has anyone successfully used PS to create groups and assign a owner (another SP group not a domain user). The scripts I've found online, I can't get them to work. Just wondering if anybody has any ...
2
votes
2answers
74 views

SharePoint Online management shell : Get-SPOSite

How to check if subsite exist in sharepoint online through SharePoint Online management shell. I can not see any Get-SPOWeb command like Get-SPOSite
0
votes
1answer
25 views

Export to CSV and format in a table

I am using this code but I would like to view in a table and export as a CSV but all my attempts have failed. Where does the code go? $siteUrl = "URL" $site = Get-SPSite $siteUrl ...
2
votes
0answers
20 views

AD Module for powershell - can't write back to Active Directory Insufficient access rights to perform the operation [closed]

I have a powershell script that imports active directory module , import a .csv file and update a few attributes in AD from SAP. I run windows powershell ISE as administrator. When I run it under ...
3
votes
2answers
46 views

SP2007 - List all checked out / unversioned files

I am in the process of migrating our SP2007 farm to SP2013 using a migration tool. Where it is currently having issues, is where it skips documents that have "no checked in version". I can see these ...
0
votes
0answers
11 views

Copying Append Changes Multi-line columns with powershell

I need to migrate the contents of LISTA to LISTB using powershell. LISTA has a RESOLUTION multi-line of text column with append changes enabled and history of comments added to that column. I need to ...
1
vote
1answer
94 views

Remove Orphans site collections inside my content database raised the following:- Exception calling “Repair” with “1” argument(s)

I run the product configuration wizard on my SharePoint server 2013, after a hot fix installation:- psconfig.exe -cmd upgrade -inplace b2b -wait -force but i received the following exceptions, ...
0
votes
0answers
16 views

List Sharepoint groups powershell - missing groups

I am using this code to list all groups within a web app. When I look at results not all the groups are there. When I go to the root of the site - people and groups, the groups are there. Why are ...
1
vote
0answers
32 views

How to update a Lookup field in one list with info from another list using Powershell or Workflow

I have a site that an SSIS package dumps thousands of items on to. The manager of the department wants a second list created. He wants to use a lookup column on list two to grab a single field called ...
1
vote
0answers
11 views

How to download multiple documents at once using powershell only specific document ids

i have a dcoument library in sharepoint record center application , enabled a document id for this web application , and in this document library users uploaded lot of documents 2000. and here i ...
4
votes
1answer
44 views

Change SharePoint group owner with Powershell to a SharePoint group

I have this PS script to change the group owner of a SharePoint group to a domain user. I would like to use this script to change it to an existing SharePoint group. The current script only allows ...
0
votes
2answers
20 views

Restore 1 site collection from a content database that contains several other site collections

for testing purposes I need to restore a site collection form our Live environment to our test farm environment. I have done this a few times where a site collection has its own database, but in this ...
3
votes
0answers
24 views

What permissions do I need to update SiteCacheSettingsWriter with Powershell?

I'm trying to enable and configure output cache on a site collection with Powershell. But I get an Access denied when running the script. Exception calling "Update" with "0" argument(s): "Access ...
3
votes
0answers
108 views

SharePoint Online how to add Links to Global Navigation Bar using PowerShell V5

I am trying to modify a PowerShell script to add Links to the SharePoint Online Global Navigation bar of my sites. I currently have a script which will add a "Header" to the Global Navigation Bar, but ...
3
votes
0answers
39 views

Sharepoint 2013: Get Items by Term-Tree

i have a list with a Termfield. I want all Items that have the Term "Stationärer Bereich:Vertrieb" or "Stationärer Bereich:Vertriebsinnendienst" (Including the subtree Terms). This is my Termset: ...
1
vote
1answer
32 views

Switch permission on file and folder

I made a script that load recursively all item and fold with unique permission, and I want to switch all permission on these items and folder to read. How can I do that? Function GetFiles($folder) { ...
1
vote
1answer
78 views

How to make Sharepoint subsite readonly without break inheritance

I use this script to switch permission into subsite, but when I have special permission for specific directory, all right is broken. Can you help me please? Param ( [Parameter(Mandatory=$True, ...
1
vote
0answers
27 views

Import-SPWeb not importing Custom Person / Group Column Values

I have a SharePoint 2013 Multi-Tenant farm configured to use FBA. I tried exporting a site in one of the site collections of the tenant using Export-SPWeb. I did include the option ...