PowerShell Logo Small

New-ADResourceProperty



This is the built-in help made by Microsoft for the command 'New-ADResourceProperty', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new resource property in Active Directory.

SYNTAX


New-ADResourceProperty [-DisplayName] <String> [-AppliesToResourceTypes <String[]>] [-AuthType {Negotiate | Basic}] [-Credential <PSCredential>] [-Description <String>]
[-Enabled <Boolean>] [-ID <String>] [-Instance <ADResourceProperty>] [-IsSecured <Boolean>] [-OtherAttributes <Hashtable>] [-PassThru] [-ProtectedFromAccidentalDeletion
<Boolean>] [-Server <String>] [-SharesValuesWith <ADClaimType>] [-SuggestedValues <ADSuggestedValueEntry[]>] -ResourcePropertyValueType <ADResourcePropertyValueType>
[-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-ADResourceProperty cmdlet creates a new resource property in the directory.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=291074
Get-ADResourceProperty

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>New-ADResourceProperty -DisplayName "Authors" -ResourcePropertyValueType MS-DS-MultivaluedText



This command creates a new resource property with display name Authors. The resource property allows the names of multiple authors to be specified.




-------------------------- EXAMPLE 2 --------------------------

PS C:\>$us = New-Object Microsoft.ActiveDirectory.Management.ADSuggestedValueEntry("US", "United States of America", "United States of America")
PS C:\> $jp = New-Object Microsoft.ActiveDirectory.Management.ADSuggestedValueEntry("JP", "Japan", "Japan")
PS C:\> New-ADResourceProperty -DisplayName "Country" -ResourcePropertyValueType MS-DS-MultivaluedChoice -SuggestedValues $us,$jp



This command creates a new resource property with display name Country. The suggested values are set to US and JP. Applications using this resource property would allow
their users to specify one of the suggested values as this resource property's value.




-------------------------- EXAMPLE 3 --------------------------

PS C:\>New-ADResourceProperty -DisplayName "Country" -ResourcePropertyValueType MS-DS-MultivaluedChoice -SharesValuesWith Country



This command creates a new reference resource property with display name Country. It uses an existing claim type named Country for its suggested values. This enables the
resource property to be always valid for comparisons with the referenced claim type in a central access rule.




-------------------------- EXAMPLE 4 --------------------------

PS C:\>New-ADResourceProperty -DisplayName "Authors" -ResourcePropertyValueType MS-DS-MultivaluedText -ID "Authors_60DB20331638"



This command creates a new resource property with display name Authors, and sets its ID to Authors_60DB20331638.

The ID should only be set manually in a multi-forest environment where the same resource property needs to work across forests. By default, New-ADResourceProperty generates
the ID automatically. For resource properties to be considered identical across forests, their ID must be the same.