Questions tagged [powershell]

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 local and remote Windows systems.[except from WikiPedia]

Filter by
Sorted by
Tagged with
0
votes
1answer
11 views

Unable to set sharepoint workflow job property

I'm trying to to run the below command but error which I have never seen before. I have ran this many times never got this error. stsadm -o setproperty -propertyname "job-worfklow" -propertyvalue "...
0
votes
0answers
18 views

get-pnpfile but import into an object

I'm using PNP powershell to connect to SPO and download files using get-pnpfile, while initial test are good for downloading files, what I really want to do is download the file into an object rather ...
0
votes
2answers
33 views

Remove anonymous link from SharePoint thanks to PowerShell

I am currently working on a script that should remove an anonymous link from SharePoint using Powershell. I don't know where to start and i would like to know if somebody has an idea on how to do it. ...
0
votes
2answers
35 views

Error in copying file: The specified user could not be found

I'm copying the files between site collection document libraries in share point online using the below script but it failing to copy the files when the author of the files no longer exists. Below is ...
0
votes
1answer
34 views

CAML in Powershell within 2 dates

I've been tweaking my code with various solutions discovered here and elsewhere with no luck so I figured its time to ask for help. I'm using Posh ver. 4.0 on SP 2013 Enterprise on-premises. I have a ...
0
votes
0answers
9 views

Add Email ID along with the domain names in all the groups - SharePoint 2016

Currently in my SharePoint 2016- On premises, i've requirement that i need to add the email ID of the users in all the SharePoint groups in the site, and already the user accounts of the same users ...
0
votes
1answer
71 views

Restoring Thousands of Items From Recycle Bin

This seems to be a common occurence with our users and OneDrive. One user tried to free up space on their hard drive and deleted 35K documents from a synced document library in SharePoint Online. The ...
0
votes
1answer
28 views

You cannot call a method on Null valued expression at: $File = $Web.GetFile([Guid]$Result.Id)

I have queried AllDocs table using Powershell and can see GUID values of Id, SiteId and WebId, But I am getting Error: You cannot call a method on Null valued expression at this line below: $File = $...
0
votes
0answers
30 views

Need to Open Word Document From Sharepoint Document Library and delete all comments from the word Document

I refered Remove all comments and comments block in a Word-Document (.docx) using PowerShell But here the code need a local path but i need to open word from sharepoint online document library using ...
0
votes
2answers
43 views

SharePoint Online - Possible to create a list item with an ID which was already deleted

I have a SharePoint Online list where the ID of the latest item created is 2006. The list has some custom parent, child functionality where the ID of the parent item should be smaller than the child ...
0
votes
0answers
31 views

SPO Site SWAP Communications site with Tree View/ left panel structured navigation

I'm trying to invoke a site swap using powershell. Invoke-SPOSiteSwap -SourceUrl [site URL] -TargetUrl [site URL] -ArchiveUrl [site URL]/sites/archive I get the error message: The Site is not a ...
0
votes
2answers
47 views

Update orphan users with active users in sharepoint online

I need to find out inactive users and replace them with active users as I am getting an error while copying the documents through PowerShell script due to author of the file no longer exists. I know ...
0
votes
0answers
13 views

Cannot write applicationHost.config file while running New-SPWebApplication and PSCONFIG

When I use New-SPWebApplication I am getting error below error in SharePoint 2019 I am using SharePoint Farm Admin account. After searching lot, I found out that after enabling Distribution Cache ...
1
vote
2answers
301 views

Problem with login to Sharepoint Online using Powershell

See image. I am getting the error "Exception calling "ExecuteQuery" with "0" argument(s): "The sign-in name or password does not match one in the Microsoft account system." when I try to connect to SP ...
1
vote
2answers
48 views

SharePoint Online - Possible to update ID column value in a list for an existing item?

In SharePoint Online, Is there a way to update the ID column(for an existing item) in a list with our value? We have a SharePoint list where I want to update the ID column value with my own value. I ...
0
votes
1answer
29 views

Retrieve site collection admins

When we login into sp online tenant site, we can see site coll admins of sites to which we donot have access. Is it possible to retrieve primary and secondary admin of all site collection without ...
0
votes
2answers
143 views

Delete Unique permission in one library in Sharepoint Online

I have a problem with my Sharepoint. I migrated data from NAS to SPO using a migrate tool. This solution adds unique permission to the library and sublibraries. I have more than 250k objects so I can'...
0
votes
0answers
11 views

Removing shareling from a specific SharePoint or Onedrive File to a specific person

Function Remove-OneDriveSharingLink { param ( $OneDriveURL ) process{ Connect-PnPOnline -Url $OneDriveURL $Ctx= Get-PnPContext $Files= Get-PnPListItem -List "documents" foreach( $File in ...
1
vote
2answers
29 views

What is client context and role assignments?

This script is used to remove all sharing link on files. My question is: I don't understand what Get-PnPContext is or what RoleAssignment is? I don't understand those commands, can someone explain ...
0
votes
0answers
23 views

Remove a specific External user access link on a file in SharePoint with PowerShell

In SharePoint, users are able to share files with specific people (external user). I would like to remove a specific file access link for a specific external user account with PowerShell, having as ...
1
vote
1answer
27 views

How to add multiple groups value in people or group field using powershell script in server side in SP2016

How to add multiple groups value in people or group field using powershell script in server side in SP2016. I am trying to add multiple group names in People or Group filed in list using Powershell ...
1
vote
2answers
37 views

Cannot write configuration file while New-SPWebApplication

When I use New-SPWebApplication I am getting error below error in SharePoint 2019 I am using SharePoint Farm Admin account. What can be the reason for it. Some time It will finsih without error
1
vote
1answer
57 views

remove an access from a specific person to a specific file or folder of Sharepoint et Onedrive using PowerShell

I am actually working on a script that should remove access from a specific person to a specific file or folder. We can share files to person from outside our organisation using Onedrive and ...
0
votes
1answer
97 views

Powershell Get List Items DataTable Group by on multiple columns/fields

I am trying to use PowerShell Group-by on the DataTable obtained from the SPListItemCollection. The reason for using the PS Group-By is because the CAML query groupby options do not return the ...
0
votes
1answer
17 views

PowerShell command to create a SP User permission report

I'm pretty new to PowerShell. What's the best command to run to get a list of user permissions on a SP Online site? Thanks in advance.
1
vote
2answers
21 views

Sharepoint : how to create a navigation link in sharepoint home site automatically when a new site is created using ms teams

As soon as we create a site using teams there should be a navigation link generated in the sharepoint homepage?
1
vote
1answer
70 views

Rename SharePoint 2019 Content Database Issue

I am trying to rename database SharePoint Admin Content database for that I am using below PowerShell commands in SharePoint 2019 New-SPContentDatabase -Name SharePoint_AdminContent -WebApplication ...
1
vote
1answer
17 views

Loop not ending when if statement condition fails - SP2010

In SP2010, I'm trying to move files from one library to another using Powershell. The condition for file move is that the files should be greater than 3 years/1095 days from the date of creation. I'm ...
2
votes
1answer
44 views

Prevent guest users to Sync

What settings do I need to check to prevent guests from syncing files from a Team Site (no office group)? The feature I'm talking about was requested here https://onedrive.uservoice.com/forums/...
1
vote
0answers
23 views

WSP package deployed through Powershell commands not reflecting the changes

There are few custom items like lists,content Types and pages which gets deployed through couple of features. When I directly deploy from visual studio, the custom items are deleted and recreated ...
0
votes
1answer
28 views

How to exclude documents migration which were not accessed in last 'X' years using power shell

I'm copying the files from source site to destination site through the power shell using the below code. Now, my requirement is to exclude the files from source site in copying which were not ...
0
votes
1answer
24 views

I find some problem during during the configuration of my development environment sharepoint online

here is the command I executed: yo @microsoft/sharepoint At the end of the execution of this command I reach the expected result despite having encountered these errors or I wonder if these errors ...
0
votes
2answers
58 views

Powershell to move files from one library to another - SP2010

In SP2010, I'm trying to move all the files from one library to another using Powershell. I'm using the below script to first copy the files from source to destination and then delete the source file....
0
votes
1answer
26 views

Powershell - get a list of all SharePoint Group for all web application - output to csv

So, I'm trying to write a script to iterate through all web apps, extract the groups & members from each site collection/child site and output to CSV. I used Konstantin Vlasenko's function to ...
0
votes
0answers
83 views

Cannot start WorkflowServices.WorkflowServicesManager in CSOM

I have been trying to manage workflows using Powershell, namely to be able to perform bulk termination of workflows. However, I am unable to initialise the WorkflowServicesManager in CSOM. I had the ...
0
votes
0answers
15 views

Visio disconnects itself

Please help me to resolve this issue. In official sources, I did not find the answer to my question. The Visio service did not work. I found how to fix it. But after some time it stopped working. I ...
1
vote
2answers
76 views

Convert SharePoint file object into hex string

I am trying to convert sharepoint attachment into hexadecimal string and push it to SQL via powershell. How can we convert sharepoint file/document into hex in CSOM / Powershell.
1
vote
1answer
37 views

Default Site Collection Administrators

I have a DEV Office 365 that was not setup by me. I am trying to create new site collections via PowerShell. Somehow, I see a bunch of AD groups and users automatically added as Site Collection ...
0
votes
1answer
22 views

Get farm status using CSOM PowerShell on premises

For complicated certificate/remoting reasons, we cannot use the PSSnapin Microsoft.SharePoint.PowerShell. I found a tutorial using CSOM objects, see example code: Import-Module "C:\Program Files\...
0
votes
0answers
13 views

Update SharePoint List based on another SharePoint List records with powershell

I am currently trying to update information in Reports List where items are exist in Records List. The current Reports are updating based on Records list filter however it ignore date filter if($date -...
0
votes
1answer
30 views

How to filter sharepoint list with CAML query with more than one filters

The following filter CAML query is working as expect. I would like to add filter for record that only created today. Are you able to point out what i have missed or done incorrectly. Thank you. I ...
0
votes
1answer
22 views

Assign multiple words as input from a CSV file without Quotes

I am running the below script to add users to SharePoint group in SPO sites: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $users= "" $users = import-csv D:\User.csv ...
0
votes
1answer
25 views

Is it possible to automate adding SharePoint sites to policies in Security & Compliance Center using PowerShell?

Good afternoon, I hope to get some advice on how to tackle the following task: I’ve automated the provisioning of SharePoint websites and the user can request a website using a PowerApps form. On ...
0
votes
1answer
26 views

Update wsp on a specific web application(with multiples)

I have a SharePoint farm with multiple(let us say I have 5 web applications). Every solution has currently the wsp solution installed(we can call it solution1.wsp) The thing I want to do is I want ...
1
vote
1answer
34 views

Copy list column value to another in SharePoint Online

Within a SharePoint Online list I am attempting to update a column based on another column, all within the same list. List - TestUpdate Source Column - Created Destination Column - Scan Date I ...
1
vote
2answers
28 views

How can i create a design to comunication site with custom layout to home page?

I know that i can create scripts and designs for types of sites (comunication or team site). I can config default themes, create lists etc. However i did not find a way to config the home page layout ...
1
vote
1answer
68 views

Which permissions do Azure AD Apps need to get SPO admin rights?

I want to automate SharePoint admin tasks with Azure Automation. I don't want to use user/password but Service Principle. (We have MFA enforced.) I set up a new "Azure Automation" account, including ...
1
vote
2answers
102 views

Delete sharepoint files older than 60 day using Rest api from powershell

I am working on a powershell script to delete files in a specific folder in SharePoint 2013. We do not have SharePoint online so the operation must be done with Rest API and from powershell. Can ...
2
votes
1answer
19 views

Office 365 permission list of a single user in different collections

I want to see all various site permissions which user has in all site collections - globally within my organization. Office 365. My idea is a Powershell script which would make a report about all/...
4
votes
2answers
747 views

Download specific files from a folder in Sharepoint by using Powershell

I am currently trying to automatize downloading certain files in a Sharepoint-online folder by scripting in PowerShell. At this point the script (look below) only downloads one specific file, while I ...

1 2
3
4 5
76