Closed

Write a PowerShell Command that will loop through multiple URLs to pull back webpart names and locations with SIPI and or Bamboo in the naming convention

I have a script that works for the [login to view URL] part of the retrieval but only for one URL at a time. I need the syntax to read URL 1, URL 2, URL 3 then compile it to an excel output. Also I need the syntax to look the term Bamboo in the webpart title. this is my current script.

Add-PSSnapin [login to view URL] -ErrorAction SilentlyContinue

#Configuration parameters (run script per site collection)

$SiteURL = "[login to view URL]"

$ReportOutput="C:\[login to view URL]"

$ResultCollection = @()

#Get All Subsites in a site collection and iterate through each

$Site = Get-SPSite $SiteURL

ForEach($Web in $[login to view URL])

{

write-host Processing $[login to view URL]

# If the Current Web is Publishing Web

if ([[login to view URL]]::IsPublishingWeb($Web))

{

#Get the Publishing Web

$PubWeb = [[login to view URL]]::GetPublishingWeb($Web)

#Get the Pages Library

$PagesLib = $[login to view URL]

}

else

{

$PagesLib = $[login to view URL]["Site Pages"]

}

#Iterate through all Pages

foreach ($Page in $[login to view URL] | Where-Object {$[login to view URL] -match ".aspx"})

{

$PageURL=$web.site.Url+"/"+$[login to view URL]

$WebPartManager = $[login to view URL]([[login to view URL]]::Shared)

#Get All Web Parts data

#foreach ($WebPart in $[login to view URL])

foreach ($WebPart in $[login to view URL] | Where-Object { $[login to view URL]().ToString() -like "[login to view URL]*"} )

{

$Result = New-Object PSObject

$Result | Add-Member -type NoteProperty -name "Site URL" -value $[login to view URL]

$Result | Add-Member -type NoteProperty -name "Page URL" -value $PageURL

$Result | Add-Member -type NoteProperty -name "Web Part Title" -value $[login to view URL]

$Result | Add-Member -type NoteProperty -name "Web Part Type" -value $[login to view URL]().ToString()

$ResultCollection += $Result

}

}

}

#Export results to CSV

$ResultCollection | Export-csv $ReportOutput -notypeinformation

#Find a specific Web part change Line#34 to:

#foreach ($WebPart in $[login to view URL] | Where-Object { $[login to view URL]().ToString() -like "*bamboo*"} )

Evner: Powershell, Sharepoint

Se mere: write words command, macro loop multiple columns read data, multiple urls images xml storing, which two of the following file names use poor file naming conventions, naming convention in sharepoint 2013, sharepoint group naming convention, sharepoint file names, contract naming conventions, force file naming convention, iso file naming convention, sharepoint list naming conventions, net asynchronous http multiple urls, open multiple urls actionscript, write sql command list employee names ages, excel macros loop multiple conditions, visual basic loop multiple conditions, excel macro loop multiple conditions, vba excel loop multiple conditions, free paypal ipn relay multiple urls, loop multiple condition vba

Om arbejdsgiveren:
( 14 bedømmelser ) Washington, United States

Projekt ID: #17533580

8 freelancere byder i gennemsnit $74 på dette job

bdrudra

"" SharePoint & Power Shell scripting Expert "" Hello there, Hope you are doing great !! We are a small but excellent team of SharePoint and .Net developers. We have more than 6 years of experience in SharePoi Flere

$111 USD på 1 dag
(29 bedømmelser)
5.6
venkat071292

Greetings!! I am an Microsoft certified professional with expertise in Windows Powershell I have done various automation projects using Powershell for the past 4+ years. I can accomplish the given task using W Flere

$55 USD in 3 dage
(21 bedømmelser)
4.4
erdikudu

Hi Sir/Madam I have been working on sharepoint for 7 years. I have experience about sharepoint installation,configuration,development and integration.

$100 USD på 1 dag
(3 bedømmelser)
2.4
TheMacStack

Hello I am an experienced PowerShell Dev and would be happy to help you with this. Thanks Callum

$35 USD in 2 dage
(1 bedømmelse)
1.8
amarjit07

I have 8+ years of experience in Microsoft technologies. I have good knowledge in PowerShell Scripting.

$88 USD på 1 dag
(0 bedømmelser)
0.0
MedAchref

As a SharePoint Administrator in a very large company (As you can see in my LinkedIn profile) 13 mixed (On Prem and online) farms, it is more than a daily task writing PowerShell scripts for SharePoint

$66 USD på 1 dag
(0 bedømmelser)
0.0
$111 USD in 5 dage
(0 bedømmelser)
0.0
BurgeonSoft

We already have script written for another project just need to make some tweak and you will be done. We have very good experience in SharePoint 2007,2016, Online and all kind of customization. Thanks,

$25 USD på 1 dag
(0 bedømmelser)
0.0