Click here to Skip to main content
14,303,726 members

SharePoint

 
QuestionCould anybody please make me understand this coding based on SharePoint. I started learning SharePoint just 10 days ago. Pin
Mratyunjay Kaushik11-Sep-16 23:12
memberMratyunjay Kaushik11-Sep-16 23:12 
AnswerRe: Could anybody please make me understand this coding based on SharePoint. I started learning SharePoint just 10 days ago. Pin
Richard MacCutchan13-Sep-16 0:28
protectorRichard MacCutchan13-Sep-16 0:28 
Questionadd extra filter (user input) in search results webpart Pin
Mohamed Al Maghraby9-Aug-16 6:13
memberMohamed Al Maghraby9-Aug-16 6:13 
QuestionCascading Dropdownlist Pin
James Cash9-Aug-16 2:55
memberJames Cash9-Aug-16 2:55 
AnswerRe: Cascading Dropdownlist Pin
DanielBrownAU9-Aug-16 13:46
professionalDanielBrownAU9-Aug-16 13:46 
GeneralRe: Cascading Dropdownlist Pin
James Cash9-Aug-16 20:15
memberJames Cash9-Aug-16 20:15 
GeneralRe: Cascading Dropdownlist Pin
James Cash10-Aug-16 10:14
memberJames Cash10-Aug-16 10:14 
QuestionNeed help with Powershell Script to export list of OneDrive for business site collection owners. Pin
SiddiquiMohammed2-Aug-16 11:53
memberSiddiquiMohammed2-Aug-16 11:53 
Hello,

I am new to this site.

I am the SharePoint Online Administrator. In our organisation we need to perform the audit.

we would like to know the user names that are having full control or are in owners group in all the OneDrive for business site collections in office 365 SharePoint Online.

I was trying to create the script but at some point it is throwing an error. the script is mentioned below.

<br />
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue<br />
Import-Module ‘C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell’ -DisableNameChecking<br />
<br />
$Fulldomain="makaveli.onmicrosoft.com" <br />
 <br />
#Step2: Connect to SharePoint Online and MsolService <br />
$credential = get-credential  <br />
Connect-SPOService -Url “https://makaveli-admin.sharepoint.com/” -Credential $credential  <br />
Connect-MsolService -Credential $credential <br />
 <br />
#Step3: Set OneDrive Storage Quota for all Office 365 Users  <br />
$users=Get-MsolUser <br />
$users | Foreach-Object{  <br />
$user=$_ <br />
$username=($user.userprincipalname –Split “@”)[0] <br />
$Dname=($Fulldomain -Split "\.") <br />
If($Dname[2] -ne $null) <br />
{ <br />
$Firstname=$Dname[0] <br />
$Secondname=$Dname[1] <br />
$thirdname=$Dname[2] <br />
$sitename= "https://"+$Firstname+"-my.sharepoint.com/personal/"+$username+"_"+$Firstname+"_"+$Secondname+"_"+$thirdname <br />
} <br />
Else <br />
{ <br />
$Firstname=$Dname[0] <br />
$Secondname=$Dname[1] <br />
$sitename= "https://"+$Firstname+"-my.sharepoint.com/personal/"+$username+"_"+$Firstname+"_"+$Secondname  <br />
} <br />
<br />
<br />
$Groups = Get-SPOSiteGroup -Site $sitename<br />
Foreach($Group in $Groups){<br />
Foreach($Role in $Group.Roles){<br />
If ($Role.Contains(“Full Control”))<br />
{<br />
Write-Host $Group.Title<br />
Write-Host $Group.Users<br />
$users = $Group.Users -join ‘ ‘<br />
$title = $Group.Title<br />
$props = @{Title = $title<br />
Users = $users<br />
Website = $sitename<br />
}<br />
$temp = New-Object psobject -Property $props<br />
$temp | export-csv –append –path C:\SiteOwnerandSites.csv<br />
}<br />
}}}<br />
<br />

==================================================

by running the above script I am getting the following error message:

<br />
<br />
Get-SPOSiteGroup : Cannot get site https://makaveli-my.sharepoint.com/personal/Mohammed_makaveli_onmicrosoft_com.<br />
At line:32 char:11<br />
+ $Groups = Get-SPOSiteGroup -Site $sitename<br />
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
    + CategoryInfo          : NotSpecified: (:) [Get-SPOSiteGroup], ServerException<br />
    + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.GetSPOSiteGroup<br />


I am able to retrieve the owners details in csv files for SharePoint Online team sites using the below command:

<br />
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue<br />
Import-Module ‘C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell’ -DisableNameChecking<br />
Connect-SPOService<br />
<br />
$AllSites = Get-SPOSite<br />
<br />
Foreach($site in $AllSites){<br />
Write-Host $site.Url<br />
$Groups = Get-SPOSiteGroup -Site $site.Url<br />
Foreach($Group in $Groups){<br />
Foreach($Role in $Group.Roles){<br />
If ($Role.Contains(“Full Control”))<br />
{<br />
Write-Host $Group.Title<br />
Write-Host $Group.Users<br />
$users = $Group.Users -join ‘ ‘<br />
$title = $Group.Title<br />
$props = @{Title = $title<br />
Users = $users<br />
Website = $site.Url}<br />
$temp = New-Object psobject -Property $props<br />
$temp | export-csv –append –path C:\SiteOwnerandSites.csv<br />
}<br />
}}}<br />



using Get-spoSiteGroup -site "teamsitename" i am able to retrieve the owners information but if I use "Get-SPOSiteGroup -site "MySite URL of user" its throwing error the same error.

Do let me know if is there any custom cmdlets needed.

Thanks and Regards,
Mohammed Jasim
QuestionCustom webparts improvement in Sharepoint 2016? Pin
senthill17-Jul-16 4:34
professionalsenthill17-Jul-16 4:34 
AnswerMessage Closed Pin
18-Aug-16 15:30
memberMember 1269129518-Aug-16 15:30 
QuestionCan a SharePoint WFE be added to a farm to host unique web applications that are not part of the existing farm? Pin
littleGreenDude27-Jun-16 7:56
memberlittleGreenDude27-Jun-16 7:56 
QuestionRun powershell script through sharepoint workflow Pin
Member 1158827023-Jun-16 5:44
memberMember 1158827023-Jun-16 5:44 
QuestionHow Can I pass EffectiveUserName to SSAS through Excel Service using FBA(Forms based authentication) in SharePoint 2013 Pin
Mahdi Moghimi14-Jun-16 23:24
memberMahdi Moghimi14-Jun-16 23:24 
QuestionUsing Powershell, how are dropdown based custom webpart properties set? Pin
littleGreenDude27-May-16 4:27
memberlittleGreenDude27-May-16 4:27 
AnswerRe: Using Powershell, how are dropdown based custom webpart properties set? Pin
Beginner Luck30-Aug-16 18:11
professionalBeginner Luck30-Aug-16 18:11 
QuestionCan I add a working asp .net application to a sharepoint page viewer? Pin
holdorf20-May-16 5:54
memberholdorf20-May-16 5:54 
AnswerRe: Can I add a working asp .net application to a sharepoint page viewer? Pin
DanielBrownAU22-May-16 14:01
professionalDanielBrownAU22-May-16 14:01 
QuestionI need to open model popup (i.e) confirmation Box , if user clicks "ok" then open infopath form in Edit mode, "cancel" then open infopath form in Read-only mode, Pin
Member 1247720121-Apr-16 18:22
memberMember 1247720121-Apr-16 18:22 
QuestionLocalizing SharePoint 2013 report viewer web part Pin
Morad Surkhi5-Apr-16 1:24
memberMorad Surkhi5-Apr-16 1:24 
AnswerRe: Localizing SharePoint 2013 report viewer web part Pin
Morad Surkhi7-Apr-16 2:02
memberMorad Surkhi7-Apr-16 2:02 
QuestionRich text editor issue for calendar page in SharePoint 2010 Pin
Member 1060186128-Mar-16 8:58
memberMember 1060186128-Mar-16 8:58 
QuestionScanned documents directly into SharePoint list as attachmen Pin
Member 1219520615-Feb-16 18:16
memberMember 1219520615-Feb-16 18:16 
AnswerRe: Scanned documents directly into SharePoint list as attachmen Pin
Richard Deeming16-Feb-16 2:15
mveRichard Deeming16-Feb-16 2:15 
AnswerRe: Scanned documents directly into SharePoint list as attachmen Pin
Bajirao_27-Apr-16 21:03
memberBajirao_27-Apr-16 21:03 
Questionmoving the page to another subsite after specific period Pin
Mohamed Al Maghraby20-Jan-16 6:03
memberMohamed Al Maghraby20-Jan-16 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.