PSPropertyExpression type

Microsoft.PowerShell.Commands.PSPropertyExpression type (it’s type accelerator – [pspropertyexpression]) exists in PowerShell from the beginning, but in version 6.1 it was made public, what makes it accessible to us, as a script and module authors.

Continue reading

Getting and changing site admins in SharePoint Server with PowerShell

In the previous post we discussed SharePoint Online cloud service. Now, let’s talk about SharePoint farm deployed on premises.

We can specify Primary and Secondary site collection administrators in the SharePoint Central Administration portal by clicking on Application Management and then on Change site collection administrators in the Site Collections section.

Primary and secondary administrators are those who, among other things, receive e-mail notifications about various SharePoint event, like when a site collection reaches its storage limit.

Also, you can specify list of other administrators in the Site Settings. To do this, on the site collection click the cog at the upper right part of the page and then click Site Settings. If there is no such a setting in the menu, click on the Site information and then on the View all site settings. Finally, click on the Site collection administrators in the Users and Permissions section.

Now, let’s do it with PowerShell.

Continue reading

sthArgumentCompleter – a PowerShell module that allows you to manage argument completers registered by Register-ArgumentCompleter cmdlet

Register-ArgumentCompleter cmdlet allows you to register argument completers, both custom and native, but there are no integrated ways to get argument completers registered in the current session or to remove some of them.

sthArgumentCompleter – is a module that allows you to manage argument completers registered by Register-ArgumentCompleter cmdlet.

Continue reading