Powershell CSOM to retrieve Permission levels tagged for the group

Can any one code me to retrieve the permission levels tagged for the group using Powershell CSOM.Please tell me the property her is my code sample

Add-Type -Path "C:\Microsoft.SharePoint.Client.dll"    Add-Type -Path "C:\Microsoft.SharePoint.Client.Runtime.dll"            #SPO Client Object Model Context      $  spoCtx = New-Object Microsoft.SharePoint.Client.ClientContext($  sSiteUrl)      $  spoCredentials = New-Object System.Net.NetworkCredential($  sUserName, $  sPassword)        $  spoCtx.Credentials = $  spoCredentials             $  web = $  spoCtx.Web     $  spGroups =$  web.SiteGroups     $  spoCtx.Load($  spGroups)     $  spoCtx.ExecuteQuery()       foreach($  group in $  spGroups)     {         #Write-Host " Group Name = $  ($  group.Title)"      } 

M2 – Get attribute group name

With the code below I can load all the attributes from a specific group, in this case attribute group with id: 37

<?php      $  av_attribute_group = $  _product->getAttributes(37);      foreach ($  av_attribute_group as $  av_attribute_groups):          $  av_attr_name = $  av_attribute_groups->getName();         $  av_attr_label = $  _product->getResource()->getAttribute($  av_attr_name)->getFrontend()->getLabel($  _product);         $  av_attr_value = $  _product->getResource()->getAttribute($  av_attr_name)->getFrontend()->getValue($  _product);          if( $  av_attr_value != "" ) :          ?>              <div class="av-product-specs-table-row">                 <div class="av-product-specs-table-row-left"><?php echo $  av_attr_label; ?></div>                 <div class="av-product-specs-table-row-right">                     <?php                          if( $  av_attr_value == "Yes" || $  av_attr_value == "Ja" ) : ?>                             <div class="av-spec-yes"></div>                         <?php elseif( $  av_attr_value == "No" || $  av_attr_value == "Nee" ) : ?>                             <div class="av-spec-no"></div>                         <?php else :                              echo $  av_attr_value;                         endif;                      ?>                 </div>             </div>          <?php endif; ?>              <?php endforeach ?> 

But I also want to load the name of attribute group with id 37, how can I do that?


Get site owner email details only from Owner group using Powershell

I need powershell snippet to get site the owner name and email details only from default site owner group

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue  Add-Type -AssemblyName System.DirectoryServices.AccountManagement  [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")  [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")  $  ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain  $  ctx = New-Object 'DirectoryServices.AccountManagement.PrincipalContext' ([DirectoryServices.AccountManagement.ContextType]::Domain) $  site = get-spweb "xxxxxx"  $  groups = $  site.Groups | where {$  _.Name -eq $  site.Title+" Owners"} $  user = @() foreach($  grp in $  groups) {          $  user = Get-SPUser -Web $  site -Group $  grp          write-host $  user.name  "`t" $  user.LoginName "`t"  $  user.Email } 

Check if user is in AD group using Javascript

I need to check if user is part of an AD Group with Javascript.

I’ve created a SP group and I added an AD Group to it and I am part of this group.

I removed my user from Site Administrators and Site owners (group with full control).

Then I tried the code found here: https://stackoverflow.com/a/43673723/2185964

But the code above did not worked. Is it possible that it is an issue caused by users profile sync? Or there is a way to add to SharePoint user profile the AD group or OU or AD directory where an user belongs and get this property using JavaScript?

Limited selection of ‘Person or Group’ pickable from mobile browser

I have a Sharepoint List with a “Person or Group” column (required, no multi-select, people only, all-users) and a default view.

On the desktop browser the name picker allows typing any name, with ‘Ctrl-k’ completion:

Screenshot from desktop browser

However, on a mobile (iOS Safari) the picker is displayed as a drop down list, with only a very limited number of name choices:

Screenshot from Safari browser

Question is, how can mobile users choose from the full selection of names? It’s only showing names up to “Andrew” but there are many more names in the org.

Thanks in advance!

I’m cursed with consistent natural 1’s and people in the group are getting annoyed. Please help!

It started off as a joke. I had to sneek past an army of zombies slowly rising out of their graves. It ended with me rolling a natural 1 on stealth and the entire party is surrounded because of my blunder. Since then I have had consistent natural 1’s that have affected the story; I end up insulting the count with a persuasion check, I’ve fallen into bottomless pits twice and I’ve had a full cart land on me because I failed a dex save.

The problem however is not the roles. Those bottomless pits? The reason I survived them was because at the last moment a powerful deity appeared out of nowhere and rescued me from falling to my death. That cart? It would have crushed me to death had it not been for the DM to say “at the last moment, an NPC dives and pushes you out of the way” and I live. The DM clearly sees that I’m cursed but does everything to prevent my death. And then last week happened…

We were fighting a demon who opened up a portal to hell that requires a successful dex save to prevent us from being sucked into it. I typically got a Nat 1 and fell in, luckily someone pulls me out, then on the next turn I get another natural 1 and fall in again. The DM knows that I’m dead because of my roles but at the last minute he says out of nowhere “suddenly the fog rolls in and your vision ceases for you to discover it was all an illusion” and I survive.

This made a lot of the other players angry because I’m creating hassle for them to solve because of my roles but also because the DM doesn’t want me to die. I said he doesn’t have to be nice to me because of my bad rolls but he keeps doing it because he knows I would have gone through 4 characters if he didn’t. And yes I have rolled other dice and I still get bad luck.

What do I do?

Adding SP user to member group – Team Site

I’m using the “Create a modern team site” using the PnP/PnPjs, and I want to add a user to the “Members” group of the newly created site.

I tried to use siteGroups.getById(5), using 5 for getting the members group and didn’t get any errors. Is this correct? Seems like the Members group ID is always 5 when using get-pnpgroup (PowerShell). (There is a high chance that I’m wrong here, might be another id?)

I also tried using:


I think I got an error using “Members”, I guess the internal name could be something else.

I’m also a bit unsure on the loginName format, I tried email, i:0#.f|membership|email@domain.com etc. but it doesn’t seem like it does anything.

Appreciate any thoughts and answers!

(I’m really new to this so I’m a bit lost, sorry)

Adding a database with Service Broker to an existing Availability Group on a new replica

  • Server 1 – SQL Server 2016 (Primary in existing AG)
  • Server 2 – SQL Server 2016 (Secondary in existing AG)
  • Server 3 – SQL Server 2016 (Offsite Secondary in existing AG)
  • Server 4 – SQL Server 2017 (New server, destined to become new primary)

An ~800GB database is happily running on the 2016 AG. It has Service Broker enabled and is running fine.

The plan is to restore the database onto Server 4, add it to the AG, then manually failover so Server 4 is the primary in order to upgrade Servers 1, 2 & 3 to SQL 2017.

Server 4 has a different drive configuration to the other Servers so in order to add the database to the AG, I am using dba-tools Restore-DbaDatabase command. The database must be left in NORECOVERY mode in order to finally add it to the AG.

The problem here is that Service Broker must be enabled via ENABLE_BROKER on the DB before it is added to the AG whereas this is not possible because of the NORECOVERY state of the DB. Also SET TRUSTWORTHY ON must be set.

Is there a way to achieve this without tearing down the whole AG?

I’m really trying to avoid this because it takes a long time to copy and restore backups onto the offsite server (Server 3) when initially joining the AG.

This guide has proved useful for the rest of the process.

In SharePoint 2019 under site content types – can i edit a group i created?

I created a content type called Contractors, the parent is ITEM and i created a custom group called Cre-hub.

I want to delete the Content Type called Contractors that i saved under the Cre8 Hub Group. When i go to do that i get the following error message:

The column that is the ITEM field which came with the list is the only item in the column / site content type. I want to delete this content type and it is not letting me. I renamed the item to Employee Last Name.

So i went back into content types and noticed

Under site settings: Content types i noticed that the following was created by the system and it is using Cre8 Hub as the source:

Display Template Content Types JavaScript Display Template

I am unable to delete this one as well.The error i get is the following:

The content type “JavaScript Display Template” is part of an application feature.

Any ideas on what could be going on here and how i can fix it?