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
42 views

Powershell error loading dlls

I have a powershell script where I load some sharepoint assemblies. It works on my machine but when I zip it up with the dlls and send it to my friend. He puts the dlls in the correct place and then ...
0
votes
0answers
22 views

“ShowInNewForm” & “ShowInEditForm” options are not saved inside a site templete

I wrote the following PowerShell script to hide certain columns at the list level, $web = Get-SPWeb http://gvstg01/CustomerPortal/with/ $list = $web.Lists["Meeting"] $field = $list.Fields["Item ...
3
votes
1answer
78 views

Rename Term store (root) with powershell - managed metadata service

Is there a way to rename Term store "root" node? (yellow in the picture below) I've tried $taxonomySession = Get-SPTaxonomySession -Site $gurl $termStore = $taxonomySession.TermStores["Managed ...
0
votes
2answers
71 views

Set Content type to inherit parent columns using powershell

I have a content type which is getting deployed through a wsp package. The elements.xml of it is <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Parent ContentType: Page ...
0
votes
0answers
31 views

Exception calling “Update” with “1” argument(s): “This functionality is unavailable for fields not associated with a list.”

I am trying to do the following:- i have a site column named "Item number". and a custom content type named "Customer Meeting" which contain the "Item number" field inside it. now i want to ...
0
votes
0answers
18 views

Can i update all the custom Edit & New forms for my subsites using powershell

I am working on Team site inside SharePoint 2013 server, so can i achieve the following scenario :- let say i have a team site collection , which have 20 sub-sites and inside the subsites's lists i ...
0
votes
1answer
16 views

Retrieve column's source in content type programatically

The source of a column in a content type can be retrieved in the User Interface as follows: Go to List Settings Click on Advanced Settings, set Allow Management of Content Types to Yes and click OK ...
0
votes
2answers
52 views

Copy site with content to another site collection

Are there any SharePoint tools out there that copy all of the content from one site collection to another? We need to get one site from our site collection and all of the lists and libraries and all ...
0
votes
0answers
18 views

Powershell Version 2 compared to version 4 loading dlls

I have a script that works perfectly in powershell version 4 but when I move it onto a machine with version 2 it kicks up a fuss. My code is below I have a controller which loads the scripts like so ...
0
votes
1answer
76 views

Unable to hide a column from the “Quick Edit” grid using JSLink

I have a custom site column named "Item Number". now i want to force this column to be un-editable inside the Quick Edit grid. now when i try to edit the site column (Site Setting>> Site Column ...
7
votes
2answers
19k views

Powershell script to find permissions for a specific user

what am i doing wrong user.ps1 $user = "sp2010\systemsacct" $site = $gc | Get-SPSite sp2010 $site | Get-SPWeb -Limit All | Get-SPUserEffectivePermissions $user Out-GridView -Title "Web ...
0
votes
1answer
25 views

Restore root site collection using PowerShell

I have a Web App with a root and four different HNSCs. I've been able to successfully backup and restore the HNSCs from a dev environment, but I am having trouble achieving this with my root site ...
0
votes
1answer
31 views

how to copy list from one sitecollection to another sitecollection

What is the best way to automate to copy a list from one site collection to another. We don't want to create a list template manually and moved to another site collection and all that process. we ...
0
votes
1answer
17 views

Add, set, get item into hashtable

I want a hashtable like this : $myHash = @{ "key1" = @{ "Entry 1" = "one" "Entry 2" = "two" } "key 2" = @{ "Entry 1" = "three" "Entry 2" = "four" } } How ...
0
votes
1answer
37 views

Check performance of a file upload but don't execute function powershell

This is a two part question I suppose. I have code as follows : Try{ Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server ...
0
votes
1answer
43 views

Powershell get user profile information

I have script who get all users. How can I get information in profile? - about - description - assignement
0
votes
0answers
23 views

SharePoint Groups not showing

I have a powershell script which created a bunch of groups in a sitecollection http://sp2013 on port 80 $path = $("C:\data\SiteCollectionGroups.csv") $csv = Import-csv -path $path ...
1
vote
3answers
73 views

Finding corrupt documents in Document Libraries

Database migration resulted in some Documents being corrupted and unable to Open. Now I need to find where these Documents resides. My plan is to use a PowerShell script to iterate through all ...
0
votes
2answers
26 views

Removing SPWeb properties from its property bag with powershell

I need to remove properties from multiple places with powershell script. I tried many examples from net, with null assigning and using remove on Properties and AllProperties, or using method ...
1
vote
3answers
2k views

How to insert data into Managed Metadata field of any Document Set using PowerShell?

I am creating a Document Set for a library using powershell and that document set contains some mandatory managed metadata fields. I am able to create document set but how can I insert data into those ...
0
votes
1answer
24 views

How to move document from document library to subsite?

I have a document library with documents. And there is a subsite with the same list. I want to move the documents from the part library to the subsite library. Is this possible to do with the ...
0
votes
1answer
19 views

How to filter document libraries using CAML query?

In my powershell script, I get all lists, then loop through and filter based on if its a document library and if its a certain content type, but I want to do this through CAML. This is the loop logic ...
0
votes
1answer
29 views

How to list the sitecollections in a sorted manner

I have written a powershell script for listing the sites in a web app. $webapp=get-spwebapplication "https://my.comp.com" $allsites= $webapp.Sites foreach($msite in $allsites) { ...
0
votes
0answers
51 views

SPDataAccess Role is not visible - Sharepoint 2013

I have a Sharepoint 2013 farm and SPDataAccess Role is available for some content DBs and not for others. Is there a way to add this role to a specific DB using PowerShell?
0
votes
2answers
1k views

Remove all list item permissions with PowerShell

I'm trying to remove all permissions from a list item (SharePoint 2013). I worked out the following script that should do that: $url = "https://Site" $listName = "Tasks"; $SPWeb = Get-SPWeb $url; ...
0
votes
1answer
31 views

How to create CAML query in powershell to compare dates?

I want to compare dates, but my code isn't working. $spQuery = New-Object Microsoft.SharePoint.SPQuery; $camlQuery = "<Query><Where><Lt><FieldRef ...
0
votes
1answer
29 views

PowerShell to delete FieldLinks for List Content Type in SP 2013

Want to know how to delete the fieldlinks for the content type. Write-Host "Deleted Redundant ACL Columns from List " $list " for web " $web.title $sitecols = @{"BU" = ...
1
vote
1answer
343 views

Get list changes in Sharepoint Online

I am using CSOM library through Powershell to get a list of changes made to a list in Sharepoint Online. I am stuck while creating an object for the changecollection. Not sure how to get the data that ...
1
vote
1answer
34 views

Creating a document library with Sharepoint powershell using template

I am trying to create a document library from a template. The template name has spaces in it through. #Add the SharePoint snapin write-host "Loading powershell module" -ForegroundColor Cyan ...
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 ...
0
votes
0answers
18 views

Powershell script to copy documents not working

I am trying to copy documents from a document library to another document library in a subsite. I have this script write-host "Starting to copy" -ForegroundColor Cyan #Add the SharePoint snapin ...
0
votes
1answer
35 views

Getting User from List Item

I've checked a few other articles on this but can't find an answer to this: I have a list which contains a User column and I want to get hold of the User to use in site permissioning. The problem I ...
0
votes
0answers
30 views

How to delete Items from Document Library and its folders in my Sub Site

I have written a PowerShell to delete the items in a Document Library to delete/clean-up the items.I have 3 folders in my Document Library and all the items in these 3 folders must also be deleted.But ...
2
votes
1answer
49 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 ...
0
votes
2answers
54 views

Get userID using CSOM powershell

I want to get the User ID using PowerShell CSOM I know its $replacedUser =$web.EnsureUser("domainName\Account") server side but I don't know how to do it client side
0
votes
0answers
82 views

change editor and author of a document via powershell CSOM

I am wanting to change the editor and author of a document in a document library in O365 using CSOM powershell. I have managed to change the dates like this : $Upload = ...
0
votes
1answer
41 views

How to add an External Data Field to a list using Powershell

I have created a BDC model using Visual Studio and deployed it using a WSP to the server. Next I want to add an External Data Column (Field) using a External Content Type in the BDC model to an ...
0
votes
3answers
45 views

PowerShell Script to retrieve every and only List / Library items in a specific view in SharePoint 2010

I am trying to iterate over each item in specific view for a list in SharePoint 2010. What i have so far works to return items in the view, but only the items in the first paginated view for that ...
0
votes
1answer
47 views

Get permission level for SharePoint Group Powershell

I have different SharePoint groups for sub-site which has unique permissions, I am writing a powershell script and I have come across a point where i need to get the permission level of a XYZ ...
0
votes
0answers
36 views

Move files from fileshare to document library but keeping modifed date, modified by CSOM Powershell

I am wanting to do a migration where I move files from a fileshare to a document library in office 365. This needs to be done in CSOM powershell and needs to keep all of the modified dates, modified ...
2
votes
1answer
52 views

How to Disable or hide SharePoint “Open with Explorer” menu option in document library

I want to Disable or hide SharePoint "Open with Explorer" menu option in document library without switching off the checkboxes "Use Remote Interfaces" "Use Client Integration Features (removes Edit in ...
0
votes
1answer
58 views

How to get the rootweb object from a subweb in SP 2013

I want to get the RootWeb object from my sub web object using PowerShell. $site= get-spsite "http://srvr1:123/sites/ceo" $rootwebb= $site.RootWeb $suburl= get-spweb ...
0
votes
0answers
18 views

Site Column,Site Content Type,List Content Type issue in SP 2013

In my Site Collection, I am facing a strange issue. I have custom Site Content Types, Site Columns created and these Site Columns were associated with Site Content Types. After creation of Document ...
0
votes
1answer
22 views

Remove list content Type Association from document library

How to remove list Content Type Association from Document Library.I have 14 content types in my SP 2013 portal. I want to know how to achieve this using PowerShell? $msite= Get-SPSite $siteurll ...
0
votes
1answer
45 views

Powershell: Activate Permissive X-FRAME-OPTIONS Header

I'm searching a way to activate the features Permissive X-FRAME-OPTIONS Header on my web application with powershell. But i can't find it with Get-Feature. Here is the feature i want to change: ...
5
votes
9answers
15k views

How to delete all items in a List using PowerShell

I am using following PowerShell script to delete all items of the List. It's working fine but take too long for huge lists. Is there any efficient way of clearing list items, something like truncate ...
0
votes
1answer
40 views

Update-SpSolution, how to know if wsp update is completed

There is a need to Update/Upgrade an existing wsp solution. I notice around 1 minute delay when Update command is run and while dlls are copied to GAC. I assume this delay could go up/down depending ...
0
votes
1answer
39 views

Find out the field or site column which are not associated with any content types

I need to find out the field or site column which are not associated with any content types in my SP 2013 site collections using PowerShell
0
votes
1answer
29 views

Powershell - Get users by group

I had a script who get all users of sharepoint site. So I can get group for each member but can you get all group of sharepoint site and get all users of each group? Thanks
3
votes
2answers
59 views

Changing User Profile Property for all the users in sharepoint 2010 using powershell

I want to change the edit setting and Display setting value of a user profile property called Department for all users. Can someone please tell me how to do it. I can get to the department ...