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

How can I remove all documents from a SharePoint 2010 Web Application

We would like to restore our entire production environment in our stage environment. After completing the restore, we would like to strip out all the documents to just leave the "structure" behind. ...
2
votes
3answers
81 views

How do I get my SharePoint 2010 Management Shell to open to PS C:\> instead of PS U:\>?

Whenever I open my SharePoint 2010 Management Shell on my remote desktop, it opens to PS U:\> rather than PS C:\> as it does on my coworker's machine. ![PS_U][1] How do I get it to ...
0
votes
1answer
16 views

unable to get the file from the style library using powershell

Trying to get access the folder and files within the style library using PowerShell in my SP 2013 env. Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue cls $weburl= ...
0
votes
1answer
54 views

Powershell query - Add email ids from SharePoint group into an email

I have few email ids generated using the below script: Script 1: Get-SPSite https://SitecollectionURL | Select -ExpandProperty RootWeb | Select -ExpandProperty Groups | Where {$_.Name -EQ "SP Group ...
0
votes
1answer
18 views

How to find SPGroups where the user is a member using PowerShell

How to find out a user who is part of the SPGroups in a site collection using PowerShell.I want to pass the userid and get the names of groups where he is part of.Later I want to delete his id from ...
0
votes
1answer
34 views

Exception error when using Powershell to start a workflow on SharePoint 2010 on an item

I am very new to powershell. I am trying to use it to start a (send Document Set to repository) workflow on selected Document Sets in a library. The workflow worked when I used it manually on one ...
0
votes
1answer
14 views

Sharepoint get SPWEB group right

Is it possible to get group right on a SPWEB? I made script who get all groups in collection but I need to get right by SPWEB. spweb1.com => admin = full control/ group2 = read spweb2.com => admin = ...
1
vote
3answers
52 views

get number of the latest version for pages using powershell script in sharepoint

I am trying to get the latest version's number foreach($item in $listItems){ $fieldValues = @{ "Title" = $item["Title"] "Created" = $item["Created"] "Modified" = ...
1
vote
2answers
47 views

How to use PowerShell with Office 365

I have searched a lot but didn't get a perfect idea on how to connect PowerShell with Office 365 SharePoint site. Can somebody please explain me how to make my SharePoint online site PowerShell ready ...
1
vote
1answer
82 views

Creating a site column of type Choice using Powershell script gives error

I have written a powershell script to create site columns in the site. I am able to create site columns of type text and number but when I try creating columns of type Choice I get error. The ...
0
votes
2answers
15 views

change configuration of webpart with powershell

I have a webpart applied on a sample page: http://mysite/page/registration I need to change the TYPE property of the webpart on this page.
0
votes
0answers
10 views

PowerShell for handling the SiteActions menu

Need the API used for handling SiteActions menu in my SP 2013 site collection.I can use SP D 2013 to manipulate SiteActions menu template, but is it possible to get this menu and its command using ...
3
votes
1answer
720 views

Connect all SSRS Reports in SharePoint library to DataSource using Powershell

We are migrating MOSS to SP2010 and have a library with hundreds of SSRS reports that use a Shared DataSource (in SharePoint Integrated mode.) Since the ReportServer database location has also ...
1
vote
0answers
23 views

Get the internal names of User Profile activities 'Blog Posts' and 'Blog Comments under 'Activities I am following'

I am using a PowerShell Script (dont remember the link from where i referenced this) that updates (Checks/Unchecks) the activities under 'Activities I am following'. I also ran a script to get the ...
0
votes
2answers
41 views

Manual Pagination for PowerShell command for SharePoint 2010/13 other than Out-host -paging

I want manual pagination for PowerShell commands for SharePoint such as Get-SPUser or Get-SPSite. I know there is command viz. Out-Host -paging facility available but it is not manual pagination i.e. ...
0
votes
1answer
36 views

Change property bag value in SharePoint 2013 using powershell

I tried to amend SharePoint site property bag value using the code in Editing property bag values using powershell However, I couldn't find the property. It seems that ...
0
votes
3answers
45 views

How can I include site admins in a csv list of site collections?

I'm building a PowerShell script to export a list of all the site collections in a particular web application. So far I have this: Get-SpWebApplication http://www.contoso.com | Get-SPSite -Limit All ...
1
vote
1answer
126 views

SP 2013 How to create new FBA sql users with PowerShell?

I set up SharePoint 2013 with FBA users (SQL). I'd like to know if it's possible to create new users using PowerShell script ? What I tried but did not work : ...
1
vote
2answers
152 views

Adding Read-Only-permissions to a list for a Sharepoint Group using Powershell CSOM

I am trying to add read-only-permissions to a specific group called "Students" for a list I have created called "Quiz". I have to use PowerShell CSOM, and in every other tutorial I've been through, ...
0
votes
2answers
43 views

apply masterpage to site collection and all subsites - SharePoint foundation 2013 using powershell

I'm working on a **sharepoint foundation 2013.**I have applied a custom masterpage on the root site the site collection.I would like all the subsites to inherit this masterpage and apply across all ...
0
votes
2answers
140 views

different version error when restoring a SharePoint site collection

So I created a new single farm SharePoint server for testing purposed (we currently had a live production farm but no testing server). I am trying to restore the back ups of the live server to the ...
1
vote
0answers
43 views

Update people field with a Get-SPOUser on sharepoint Online

I try to update a SharePoint Online people field (in a doc list), from PowerShell. Here's the code: $properties = $Upload.ListItemAllFields; $context.Load($properties) $properties["CLT"] = ...
1
vote
1answer
92 views

breakroleinheritance for a folder powershell csom

I am trying to break permission inheritance for certain folders in my document library in office 365. However when $folder.BreakRoleInheritance($false) is executed I get an error: Method ...
0
votes
1answer
49 views

Powershell Uploading complete folder hierarchy to document Library

I have the below script that currently only uploads the content of a single folder. However I have ~300 folders to upload and changing the folder name each time before running the script is not very ...
0
votes
0answers
96 views

Change List Item Created Date field with Powershell

Good Day, I have a list in SharePoint 2013 that I'm importing items from a csv. I need to change the created date to the created date of the imported item. I'm able to import the list item ...
5
votes
3answers
150 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 = ...
1
vote
3answers
5k views

Adding a User to an existing SharePoint Group

I am trying to create a script to add a user to an existing SharePoint group. I'm new to PowerShell Scripting & SharePoint, so I'm a little lost. I keep getting the error that the specified group ...
0
votes
1answer
34 views

How to use powershell background jobs to delete a SPListItem

I want to delete items from a document library using powershell 2.0, but not all of them, only ones that pass some of my if statements (and no I can't use CAML for all my conditions). So I have to ...
1
vote
2answers
3k views

deleting managed metadata using powershell script sharepoint 2010

Deleting managed metadata term stores using powershell script. Was trying with the below script but getting error "Cannot index into null array". Please help out thanks in advance.... Add-PSSnapin ...
0
votes
1answer
46 views

How to check if page exists in powershell?

I write the powershell script below to check if a webpart exists on some page on all mysites. I got an exception on the root site collection of the mysite webapplication because the page does not ...
-1
votes
2answers
865 views

“Sorry something went wrong with adding the app. Click to retry”

I am unable to remove the app, it is corrupted. Can any give example using PowerShell how to uninstall the app?
0
votes
1answer
26 views

How to Configure PerformancePoint Unattended Service Account using Exisitng SecureStore Target Application ID using PowerShell

How can you configure PerformancePoint to use an existing Target Application ID using PowerShell? Neither Set-SPPerformancePointSecureDataValues or Set-SPPerformancePointServiceApplication seem to ...
0
votes
0answers
53 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 ...
1
vote
2answers
74 views

Web.ApplyTheme() for SharePoint Online

I want to apply one of the default themes to my SharePoint site. I found Web.ApplyTheme() method which requires string colorPaletteUrl, string fontSchemeUrl, string backgroundImageUrl, bool ...
0
votes
1answer
23 views

Overwrite the same backup file every day

I want to overwrite the same back up file of an sharepoint 2013 site collection by using the below powershell command line command: Backup-SPSite -Identity http://xyz -Path D:\SP_BACKUPS\test.bak ...
0
votes
0answers
20 views

How to change and learn guid of search result source with powershellscript?

i created search result source manually. I want to change and learn guid of search result source with powershell script. How i can do? Thanks for your help.
1
vote
1answer
42 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, ...
1
vote
0answers
22 views

How to move search result source with powershell?

I have two development enviroments. I created search result source. I want to move result source from first enviroment to second enviroment. How can i do with powershellscript ? Thanks for your help. ...
0
votes
3answers
111 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
0answers
23 views

How to move data files from local C drive to Content Database in SQL Server

I am having some html files in local C drive in the laptop.. the dynamic data in those files should be moved to SQL database.. the data is further used through sharepoint after its saved on sql. ...
0
votes
1answer
36 views

How to export sharepoint management scripts' result to csv/text file

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) > $null function EnumerateUserRolesPermissions ([string]$webURL){ $site = new-object ...
2
votes
1answer
5k views

how to checkin all checked out files via powershell?

We have in our environment installed Gary LaPointe powershell cmdlets and I found this script Get-SPCheckedOutFiles which returns all checkedout files, now I need to forcely check them in, not ...
0
votes
0answers
43 views

give permissions to folders o365 powershell csom

Have this code function GetChildFolders($RootFolder) { if($count -ne 1){ ...
1
vote
1answer
112 views

looping through subfolders in document library

I have a document library and I want to loop through all the folders I have in it. I have this piece of code $Context.Load($List.RootFolder.Folders) $context.ExecuteQuery() ...
0
votes
1answer
36 views

Print all .aspx pages within pages library to PDF

I have a requirement that requires that all .aspx pages in my 'Pages' library (Publishing Site) are printed every so often so that a physical record of that publishing page can be kept. Would it be ...
0
votes
0answers
29 views

Sharepoint Powershell Export to CSV calculated columns are blank

Probably a simple answer. I am exporting to CSV via powershell from sharepoint list and my calculated columns are showing up blank. (They show up fine when I use IE to export as .iqy file) Am I ...
0
votes
0answers
29 views

Adding permissions to folders in doclib powershell csom o365

I have a document library in o365 where I want to add permissions to the folders. The folders I have are from an array and read like \test \test\migration etc. How can I find the correct folder in the ...
0
votes
1answer
33 views

Update AD attribute from a data list

I'm new to SharePoint. We have a list of AD objects that we are looking for owners. We are using SharePoint to store the data and send email out to people to accept or deny ownership to the AD object ...
0
votes
1answer
59 views

Change Quick edit on list on SharePoint 2013

I would like to set list Quick edit parameter programmatically or by schema.xml, but I can't find way to do it. View has parameter InlineEdit, but SharePoint has to set it with another way. How can ...
0
votes
1answer
68 views

Hide New Document Command from ribbon using PowerShell

Want to know how to hide New Document command from ribbon using PowerShell in SP 2013. Below is my code that does not work. $CustomAction = $list.UserCustomActions.Add() $CustomAction.Title = "Hide ...