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)

1
vote
1answer
12 views

Modify list item field using PowerShell

I have a list field that stores an XML string. I am trying to get the XML contents and modify a particular tag in the XML like so: foreach($item in $list.Items) { ...
1
vote
0answers
11 views

Power shell Script to copy sharepoint top navigation bar across site collections in sharepoint 2013

I have create a global navigation using Term Store Management Tool in Root site collection for a web application. Now i want to copy this Navigation across site collection using powershell. Can you ...
1
vote
1answer
20 views

Script work on Sharepoint 2013 but not Sharepoint 2010, Why?

I made this script to get all attachments from a list, it works on Sharepoint 2013 serveur but on Sharepoint 2010 I don't have any result... : $webUrl = "https://site.fr" $library = "Contacts" ...
0
votes
1answer
15 views

Get attachments from sharepoint list with powershell

I made this script : $webUrl = "http://site.fr/" $library = "Qualified Information" $spSite = new-object Microsoft.SharePoint.SPSite($webUrl) $w = $spSite.OpenWeb() $l = $w.Lists[$library] ...
3
votes
2answers
2k views

How to remove the builtin “Item” Content Type from a list using powershell?

I have a custom content type and I added this content type to a list. I now want this list to only use the custom content type and I want to remove the built-in "Item" content type. I tried ...
0
votes
1answer
12 views

Upload a file into Folder within Style Library using PowerShell in SP 2013

How to Upload a .css file on the folder within the Style Library of my site collection using PowerShell. I am having a style file called style_bg.css. How to get the folder within the style ...
0
votes
1answer
15 views

Get Type of User or Group

I have a case where in I have added AD security groups along with SharePoint Users to the SharePoint Groups, Now I want to fetch a list of only Security Groups from all Site Groups in SharePoint, Is ...
1
vote
3answers
1k views

Getting the list name from url with PowerShell

I am trying to parse any given SharePoint URL and get back the site, web and list references using the code below. I would like to achieve this even if I provide the URL of an item. The code below ...
0
votes
3answers
21 views

Multiple AND OR inside a powershell if statment

I am trying to write a PowerShell script for my SharePoint 2013. The idea is that I what to select all the links that are referencing /documents/ folder, and that ends with either .doc .docx or .pdf. ...
1
vote
1answer
21 views

Get attachment with element ID from list

I am trying to get attachment list with element ID from a sharepoint list. I found script to download attachment but I want to see how you would do it? Thanks by advance, ++.
0
votes
2answers
17 views

Delete Individual Items from Recycle Bin

I am using Batch Delete using Powershell. After batch delete, items are moved to recycle bin. spWeb.RecycleBin.DeleteAll(); will delete all items from recycle bin. Instead, i want to remove only ...
3
votes
4answers
124 views

how to allow Write-Host command to write into a file (notepad) rather than in the screen

I run the following script in SP PowerShell Add-PSSnapin Microsoft.SharePoint.Powershell -ea 0; $web = get-spweb 'http://tvstg01/kb/customerservice/' $list = $web.lists['Customer Service']; ...
0
votes
1answer
18 views

Synchronisation two list in Sharepoint 2013

I have got two lists with diffrent number of column: First List have got: Column "A", Column "B" and "Status" field with Choice: active, and non active. Secaund list have got this kind of column: ...
0
votes
1answer
17 views

Powershell script to add a field to all the document sets

I have created a field in sharepoint content type hub. Now I want to add this field to all the Document Libraries in my sharepoint online tenant. Is there a powershell script which can do this for ...
0
votes
0answers
6 views

How to Execute Powershell commands from a Sharepoint Hosted App?

So I need to create a Site Inventory(collection of all documents) as an OOTB Sharepoint Feature. This is the way I thought of doing it. Create a Sharepoint feature in Visual Studio wherein ...
0
votes
0answers
6 views

How to delete the content organizer rules using PowerShell in Record Center

How to delete the content organizer rules which are already existing in the record center using PowerShell
4
votes
1answer
516 views

Remove all users from all folders within a Document Library - PowerShell

How to run through all folders in a specific document library to remove inheritance and then remove all users from all folders within a specific Document Library using a Powershell script?
0
votes
2answers
910 views

How to set Navigation in Office 365 site using powershell?

I am creating some Global / Current navigations nodes on a SharePoint site (SharePoint 2010 in house site) by fetching them through a csv file. Below is the script: #Script to create Global/Current ...
1
vote
1answer
532 views

Powershell, how to check if spuser object is user or group?

I have a powershell script which is fixing some corrupted userprofiles. But the results are also groups. I would like to skip the groups and fix only the users. How can I check if the spuser object is ...
4
votes
4answers
3k views

How to programmatically determine which application pool a service application is using?

Is there a way to programmatically determine which application pool a service application is using? Further i would like to get the information about the service account the app pool is using.
1
vote
1answer
22 views

Disable the option for personal regional settings

Is there a way (through PowerShell or an other method) to disable the option for users to set personal regional settings? I have a system where I want to force users to be on UTC since changing ...
5
votes
2answers
204 views

Can I use Set-SPOUser to set an O365 security group as a secondary site collection administrator?

Is there a way to use Set-SPOUser to add a security group I created in Office 365 as a secondary site collection administrator? I have the security group's Login Name which begins with "s-1-5-21-..." ...
1
vote
0answers
21 views

Delete site collection level managed property using powershell

I have a managed property seen at Search Schema of both Search Service Application and Site collection. The one at Site Collection level does not have Refine and Sort attributes True, so I am ...
0
votes
1answer
409 views

Change SharePoint Service Account using PowerShell

In the Central Admin you are able to change a registered Service Account to a specified service (as in the image) Is this possible to manage by powershell? Thanks
2
votes
1answer
880 views

Backup-Spsite always failing with HRESULT 0x80131904

While taking backup of Site Collection on SharePoint 2010 using powershell command "Backup-SPSite" I always encounter below error : "Backup-SPSite : Exception from HRESULT: 0x80131904 At line:1 ...
1
vote
1answer
20 views

Get item by DocID using PowerShell

Has anybody retrieved items by their DocId using powershell. Specifically the ID generated by the DocID service. I'm looking to get details of items based on a (large) list of DOCIDs. I guess I could ...
0
votes
2answers
19 views

Is it possible to get SPGroup's Web application Name Directly using Powershell?

I'm trying to get The name of the The content_Db (WebApp) where a specific group lives. I've been trying to get these info by looking into the SqlDb. but I only could find Site ID reference. is ...
3
votes
2answers
207 views

Cannot delete site collection in Central Administration

I had created a site collection. But there is a problem of web-frontend server (I did not know when I created the site), so the page is always in processing. After waiting 40 mins, I closed the page. ...
0
votes
1answer
403 views

Exception calling “ExecuteQuery” with “0” argument(s): "The remote server returned an error: (400) Bad Request. CSOM SP13

I'm trying to add a page to my search centre in sharepoint 2013. Trying out cSOM too. Here is my code, I am getting a bug Exception calling "ExecuteQuery" with "0" argument(s): "The remote server ...
3
votes
1answer
3k views

Find a farm's database server and instance in PowerShell

How can I find the SQL server name AND instance where my databases are stored using PowerShell? Assuming I am not using an alias and can't check cliconfg. In servers in farm, I can see the server ...
1
vote
0answers
14 views

Can't delete a taxonomy field

I'm trying to remove a field from a powershell script. The field is a taxonomy field. However, it does not works, with this error: Site columns which are included in content types cannot be ...
0
votes
1answer
19 views

Export document library structure to file

In a 2010 site colelction I have a document library with a complicated structure and lots of subfolders that I want to move to a flat structure. How can I get a hierarchical list of all (sub-)folders ...
2
votes
1answer
468 views

SharePoint 2013 Online: List of all suspended workflows

Is there a powershell script or service out there that gives you a list of all workflow statuses? Primarily we are looking for a way to get a list of all current suspended workflows. Update: Here ...
0
votes
1answer
34 views

delete all users with specific domain prefix

I need to delete all the Users from the hidden List _catalog/users where user's domain is NorthP so sample user would be NorthP\johnd. What am I missing from the following PS code? ADD-PSSNAPIN ...
0
votes
1answer
17 views

How to find the lists which are using custom columns in MOSS 2007 environment at web app level using powershell?

I have deployed a solution which creates a custom column/field to the entire web app. But the solution doesn't contain any features. Now I want to find the lists where that custom column is used. ...
0
votes
0answers
17 views

Multiple document library creation and assiging document level unique permissions

I am trying to create multiple document libraries directly under root site collection and each library must have a unique SP group with read only permissions so for eg http://sp2013 walmart ...
3
votes
2answers
182 views

Office 365: Publish and deploy .app through PowerShell

Can we deploy a SharePoint hosted app in Office 365 (SharePoint online) using PowerShell? Like in SharePoint 2013 apps, we will import the .app file and then install it. Can this be done in Office ...
1
vote
1answer
30 views

How to get all the custom content types in MOSS 2007 site or site collection level using powershell script?

I tried using $site.rootweb.ContentTypes but it returns all the content types in the site. I only want to return the custom content types that are created by users. Please someone help me ...
2
votes
0answers
15 views

Access Crawled Property values using PowerShell

Is it possible to retrieve a list of values for a given crawled property? If so, how would this be achieved using PowerShell? For example, I have a crawled property called 'Forename' and I would ...
0
votes
2answers
21 views

Get permissions for all sites

Is there a generic powershell script that can output permissions (to csv) on all website within a site collection, as well as the top level site? I tried a few that I found but none of them worked. ...
1
vote
1answer
18 views

Determine if object is SPSite or SPWeb

I have a simple question, how to determine with PowerShell if a SharePoint Site is a SPSite object or SPWeb? I get all Site followed by user but some are SPSite.
0
votes
2answers
1k views

Create Lookup Field Powershell

I am using SharePoint 2013, I need to create a lookup field through PowerShell. I tried this code but is not working: $SiteUrl = "http://mySite" $WebObj = Get-SPWeb -identity $SiteUrl ...
1
vote
2answers
15 views

Powershell - Get compatibility from SPweb

I want to do a simple task, I made a script who get all followed site from a user. But I want to filter it with compatibilitylevel. With few sites, it's Ok, I do : $currentSite = Get-SPSite ...
2
votes
1answer
465 views

Error while running the Powershell script

I want to run the following script but getting the error "Unable to find type [Microsoft.Office.Server.UserProfiles.PropertyConstants]" #Add SharePoint PowerShell SnapIn if not already added if ...
6
votes
3answers
2k views

Problem with SP2013 solution scope: WebApplication vs GAC

I have a SP2013 solution that contains a custom WCF service, custom Timer Job and a Feature Event Reciever. Because of these the solution Assembly Deploying Target is set to GlobalAssemblyCache. The ...
4
votes
1answer
958 views

Disable site collection health check rule

Is there anyway of disabling/bypassing a site collection health check rule. For example, I want to bypass Missing Site Templates rule when I upgrade a site collection in SP 2010 mode to SP 2013. For ...
1
vote
2answers
40 views

SharePoint Online stop permissions inheritance on the list via PowerShell

As the question basically says, is there a way to stop permissions inheritance on a list or a library via PowerShell? Moreover there is a way to change user or group permissions on this list/library? ...
1
vote
0answers
10 views

How to find the List of activated features on MOSS 2007 environment?

My requirement is If i have given the web application name it should traverse through all the site collection and sites then it should show the list which contains the activated features. Please ...
2
votes
0answers
22 views

OneDrive for Business Permissions

I have a few users that have non-standard permissions for OneDrive for Business . I've found a PowerShell Script that will list all OneDrives but not the permissions. Is there a way given a site, to ...
1
vote
1answer
127 views

The timer job for this operation has been created, but it will fail

When I try to run the upgrade solution command on my server I get following error: The timer job for this operation has been created, but it will fail because the administrative service for ...