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)

0
votes
1answer
19 views

I want to remotely connect Sharepoint server through powershell whose database is on different machine

My SharePoint server is on machine M1 and its database is on machine M2. I want to connect and run SharePoint PowerShell command from altogether different machine M3 remotely with user U1. Is it ...
1
vote
1answer
24 views

Get all users in sharepoint farm and loop on them

I want a script who get all users on my sharepoint farm to save information. Do you have a simple way to get all users and loop foreach on them to get $userProfile["MainAffiliationSociety"].Value ...
0
votes
0answers
20 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 ...
5
votes
3answers
126 views

can not modify AllowGridEditing using powershell

I wrote the following script :- Get-SPWeb http://vstg01/CustomerPortal/with/ $list = $web.Lists["Meeting"] $field = $list.Fields["Item Number"] $field.ShowInNewForm = $False $field.ShowInEditForm = ...
0
votes
0answers
19 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 ...
3
votes
1answer
63 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 ...
1
vote
1answer
25 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
17 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
0answers
33 views

Can not prevent editting a field inside the Quick Edit using JSLINK

I have a site column named "Item Number" with internal name of "ID1", as follow:- PS H:\> $web.Fields["Item Number"] FieldValueType : System.String PreviewValueTyped ...
0
votes
1answer
10 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
37 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
16 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
61 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 ...
0
votes
1answer
19 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
23 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 ...
1
vote
1answer
54 views

Cannot add ReportViewer Webpart via Powershell to Page

On my SharePoint 2010 I want to automate Website-Provisioning with customized homepage. The homepage should show some SSRS ReportViewerWebparts. I get error messages, I am very surprised of and cannot ...
0
votes
1answer
12 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
31 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
30 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
20 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 ...
0
votes
2answers
59 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
2answers
19 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 ...
0
votes
1answer
18 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
15 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
1answer
15 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
0answers
32 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?
1
vote
3answers
51 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
1answer
24 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
29 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 ...
0
votes
0answers
15 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
28 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
2answers
40 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
21 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 ...
1
vote
1answer
28 views

Re-Order Name Field and other fields in the Content Type

I want to reorder the columns in the document library that's associated with my custom content types when end user uploads a document.I am having few columns col1, col2, col3, col4,col5 where col2, ...
0
votes
0answers
62 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
28 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
37 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
0answers
26 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
40 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
48 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
17 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
19 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
33 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: ...
0
votes
1answer
33 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
3answers
67 views

How to re order content types in list using PowerShell

In a Custom List there are more than 1 content types e.g. "Content Type 1", "Content Type 2" including OOB Item. Using PowerShell how can they be reordered?
0
votes
1answer
25 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
0
votes
1answer
30 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
23 views

PowerShell script for finding the site columns associated with a content type

How to find the site columns associated with a Content Type using PowerShell Script in my SP 2013 Site Collection. Add-PSSnapin Microsoft.SharePoint.PowerShell $site = Get-SPSite ...
0
votes
1answer
37 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 ...