This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name app.example.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
server_name app.example.com; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-BulkEmailAlias | |
{ | |
<# | |
.Synopsis | |
This function will create the desired email aliases for the specified mailbox | |
.Example | |
C:\PS>Add-BulkEmailAlias -PrimaryEmailAddress your.mailbox@mydomain.com -AliasPrefix testAlias –Domain @mydomain.com -NumberOfAlias 1000 | |
This example will create 1000 emails addressess called testAlias1@mydomain.com > testAlias1000@mydomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Remove-BulkEmailAlias | |
{ | |
<# | |
.Synopsis | |
This function will create the desired email aliases for the specified mailbox | |
.Example | |
C:\PS>Remove-BulkEmailAlias -PrimaryEmailAddress your.mailbox@mydomain.com -AliasPrefix testAlias –Domain @mydomain.com -NumberOfAlias 1000 | |
This example will remove 1000 emails aliases called testAlias1@mydomain.com > testAlias1000@mydomain.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-SPContentTypeField | |
{ | |
<# | |
.Synopsis | |
This function will allow you to add a library field to a Content Type | |
.Description | |
This function will add the nominated site column/ library column to a nominated Content Type | |
within all of the 'Document Libraries' in the given Site Collection | |
.Example | |
C:\> Add-SPContentTypeField –SiteUrl “http://yourdomain.com/sites/Finance –FieldName "myField" -CTypeAddedTo "myContentType" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-SPSiteContentType | |
{ | |
<# | |
.Synopsis | |
This advanced function adds a Content Type to a Document Library based on search criteria. | |
.Description | |
This function will add a new Content Type into all libraries that contain the -lookForCT specified in the function. | |
This function also produces a series of reports capturing the work carried out in the function, and any errors experienced. | |
.Example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Remove-SPSiteContentType | |
{ | |
<# | |
.Synopsis | |
This advanced function iterates through all documents within a document library and changes the | |
identified Content Type to a new Content Type. | |
.Description | |
This function will change document Content Types for all items within a document library whose Content Type | |
is specified as -CTypeToRemove, and changes it to the new Content Type -lookForCT. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Change-SPMultiFileContentType | |
{ | |
<# | |
.Synopsis | |
This advanced function iterates through all documents within a document library and changes the | |
identified Content Type to a new Content Type. | |
.Description | |
This function will change document Content Types for all items within a document library | |
whose Content Type is specified as -oldCT and changes it to the new Content Type -newCType . | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This command will import a single image into the thumbnailPhoto attribute in an Active Directory account | |
Import-RecipientDataProperty -Identity "" -Picture -FileData ([Byte[]]$(Get-Content -Path "C:\User_Images\" -Encoding Byte -ReadCount 0)) | |
# If you want to remove either the current picture, you can do so by using | |
Set-Mailbox "" -RemovePicture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-UserProfilePicture | |
{ | |
<# | |
.Synopsis | |
This is a simple approach to uploading a binary file into an active directory users AD object. | |
.Example | |
C:\> Add-UserProfilePicture -user "Joe Bloggs" -picture "C:\images\Joe_Bloggs.jpg" | |
.Notes | |
Name: Add-UserProfilePicture | |
Author: Petro Margaritis |
OlderNewer