New-EntraBetaTrustFrameworkPolicy
This cmdlet is used to create a trust framework policy (custom policy) in the directory.
Syntax
Content (Default)
New-EntraBetaTrustFrameworkPolicy
-Content <String>
[-OutputFilePath <String>]
[<CommonParameters>]
File
New-EntraBetaTrustFrameworkPolicy
-InputFilePath <String>
[-OutputFilePath <String>]
[<CommonParameters>]
Description
The New-EntraBetaTrustFrameworkPolicy
cmdlet is used to create a trust framework policy in the directory.
In delegated scenarios with work or school accounts, the admin must have a supported Microsoft Entra role or a custom role with the required permissions. The B2C IEF Policy Administrator
is the least privileged role that supports this operation.
Examples
Example 1: Creates a trust framework policy from the content specified
Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework'
$policyContent = Get-Content 'C:\temp\CreatedPolicy.xml' | out-string
New-EntraBetaTrustFrameworkPolicy -Content $policyContent
The example creates a trust framework policy from the content specified.
The contents of newly created trust framework policy are displayed on screen.
-Content
Parameter specifies the content of the trust framework policy to be created.
Example 2: creates a trust framework policy
Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework'
$policyContent = Get-Content 'C:\temp\CreatedPolicy.xml' | out-string
$params = @{
Content = $policyContent
OutputFilePath = 'C:\CreatedPolicy.xml'
}
New-EntraBetaTrustFrameworkPolicy @params
The example creates a trust framework policy from the content specified.
The contents of newly created trust framework policy are written to file mentioned in output file path.
-Content
Parameter specifies the content of the trust framework policy to be created.-OutputFilePath
Parameter specifies the path to the file used for writing the contents of trust framework policy.
Example 3: Creates a trust framework policy from the file mentioned in InputFilePath
Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework'
$params = @{
InputFilePath = 'C:\InputPolicy.xml'
OutputFilePath = 'C:\CreatedPolicy.xml'
}
New-EntraBetaTrustFrameworkPolicy @params
The example creates a trust framework policy from the file mentioned in InputFilePath.
The contents of newly created trust framework policy are written to file mentioned in output file path.
-InputFilePath
Parameter specifies Path to the file used for reading the contents of trust framework policy to be created.-OutputFilePath
Parameter specifies the path to the file used for writing the contents of trust framework policy.
Example 4: Creates a trust framework policy from the file mentioned in InputFilePath
Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework'
$params = @{
InputFilePath = 'C:\InputPolicy.xml'
}
New-EntraBetaTrustFrameworkPolicy @params
The example creates a trust framework policy from the file mentioned in InputFilePath.
The contents of newly created trust framework policy are displayed on screen.
-InputFilePath
Parameter specifies Path to the file used for reading the contents of trust framework policy to be created.
Parameters
-Content
The content of the trust framework policy to be created.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Content
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-InputFilePath
Path to the file used for reading the contents of trust framework policy to be created.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
File
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-OutputFilePath
Path to the file used for writing the contents of newly created trust framework policy.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.