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)

2
votes
1answer
520 views

How to set a default value for Date column to “Today's Date”

I am writing a powershell script to add a date type column with "Today's Date" as the default value. How I can set it up? $list | new-spjfield "Date" -internalname "Date" -type DateTime -dateformat ...
0
votes
1answer
26 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] ...
1
vote
1answer
61 views

How to set “ShowField” in peoplepicker using powershell

Does anyone know how to set "ShowField" in people picker using powershell ? For ex.x, to set the "Required" property, we can user $SiteColumn.required="true" , but for showfield, ...
1
vote
1answer
18 views

Remove site column that's associated with content type in site collection using PowerShell

I want to delete a site column using PowerShell, which is associated with my custom content types that are defined in my SharePoint 2013 site collection.When I removed the content type association ...
0
votes
1answer
15 views

How to take the backup of SPList having MMS Column

How to take the backup of SPList having MMS Column? If I take the .stp file from the list settings I can not get this managed metadata column after taking the template file. Any other way I can get ...
0
votes
1answer
10 views

How to compare the versions of 2 SharePoint Servers

I want to know how to find out the versions of 2 SharePoint servers in my development environment. I tried with the PowerShell command (get-spfarm).buildversion I got the below result for ...
1
vote
1answer
27 views

PowerShell Property for show inside folders for a document library

How to get the property for getting "Show items inside folders" within a document library's advanced settings using PowerShell script.I am having 3 folders and I do not want these folders to be seen ...
0
votes
0answers
11 views

Execute a PowerShell script on a remote SharePoint Server

How to execute a PowerShell script on a remote SharePoint Server ? I have created a ps1 file on my UAT SharePoint Server [its a WFE], Now I want to execute this same script on the Staging SharePoint ...
0
votes
1answer
532 views

UserProfileService GetUserProfile Modified Date in 2010

I have a problem when loading a UserProfile from the UserProfileService in Powershell. I am able to get a list of properties, however I can't seem to find when the profile was last modified. The one ...
4
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 ...
3
votes
1answer
61 views

how to access patches programatically

I know I can access the SharePoint-buildversion using (Get-SPFarm).buildversion in PowerShell. I also know that by accessing /_admin/PatchStatus.aspx from central administration I can view each ...
1
vote
3answers
251 views

error when executing update-spsolution

Im trying to update a web part that has been distibuted across our sharepoint intranet and im coming up with an error ive never seen before. Ive googled but cant find any info. Can someone help. ...
2
votes
1answer
1k views

Powershell to set a Web Application's Trusted Identity Provider to an STS and NTLM?

I've created a custom STS and have setup trust with SharePoint via New-SPTrustedIdentityTokenIssuer. I can use Central Admin to configure a Web Application to use both NTLM and the STS, however I ...
1
vote
1answer
18 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
14 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
24 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
13 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
16 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
24 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
24 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
19 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
137 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
21 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
24 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
7 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
912 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
543 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
208 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
422 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
884 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
211 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
421 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
4k 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
15 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
473 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
192 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
32 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
16 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 ...