Delen via


Op rollen gebaseerd toegangsbeheer beheren met Windows PowerShell

U kunt dit onderwerp gebruiken voor informatie over het gebruik van IPAM voor het beheren van op rollen gebaseerd toegangsbeheer met Windows PowerShell.

Opmerking

Zie voor de naslaginformatie over de IPAM Windows PowerShell-opdracht de IpamServer-cmdlets in Windows PowerShell.

De nieuwe Windows PowerShell IPAM-opdrachten bieden u de mogelijkheid om de toegangsbereiken van DNS- en DHCP-objecten op te halen en te wijzigen. De volgende tabel illustreert de juiste opdracht voor elk IPAM-object.

IPAM-object Opdracht Beschrijving
DNS-server Get-IpamDnsServer Met deze cmdlet wordt het DNS-serverobject in IPAM geretourneerd
DNS-zone Get-IpamDnsZone Deze cmdlet retourneert het DNS-zoneobject in IPAM
DNS-resourcerecord Get-IpamResourceRecord Deze cmdlet retourneert het DNS-bronrecordobject in IPAM
Voorwaardelijke DNS-doorstuurserver Get-IpamDnsConditionalForwarder Deze cmdlet retourneert het DNS-object voor een voorwaardelijke doorstuurder in IPAM
DHCP-server Get-IpamDhcpServer Met deze cmdlet wordt het DHCP-serverobject in IPAM geretourneerd
DHCP Superscope Get-IpamDhcpSuperscope Met deze cmdlet wordt het DHCP-superscopeobject in IPAM geretourneerd
DHCP-bereik Get-IpamDhcpScope Met deze cmdlet wordt het DHCP-bereikobject in IPAM geretourneerd

In het volgende voorbeeld van opdrachtuitvoer haalt de Get-IpamDnsZone cmdlet de dublin.contoso.com DNS-zone op.

PS C:\Users\Administrator.CONTOSO> Get-IpamDnsZone -ZoneType Forward -ZoneName dublin.contoso.com

ZoneName             : dublin.contoso.com
ZoneType             : Forward
AccessScopePath      : \Global\Dublin
IsSigned             : False
DynamicUpdateStatus  : None
ScavengeStaleRecords : False

Toegangsbereiken instellen voor IPAM-objecten

U kunt toegangsbereiken instellen voor IPAM-objecten met behulp van de Set-IpamAccessScope opdracht. U kunt deze opdracht gebruiken om het toegangsbereik in te stellen op een specifieke waarde voor een object of om ervoor te zorgen dat de objecten het toegangsbereik overnemen van bovenliggende objecten. Hier volgen de objecten die u met deze opdracht kunt configureren.

  • DHCP-bereik

  • DHCP-server

  • DHCP Superscope

  • Voorwaardelijke DNS-doorstuurserver

  • DNS-resourcerecords

  • DNS-server

  • DNS-zone

  • IP-adresblok

  • IP-adresbereik

  • IP-adresruimte

  • IP-adressubnet

Hier volgt de syntaxis voor de Set-IpamAccessScope opdracht.

NAME
    Set-IpamAccessScope

SYNTAX
    Set-IpamAccessScope [-IpamRange] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]  [<CommonParameters>]

    Set-IpamAccessScope [-IpamDnsServer] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamDhcpServer] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamDhcpSuperscope] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamDhcpScope] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamDnsConditionalForwarder] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamDnsResourceRecord] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamDnsZone] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamAddressSpace] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]
    [<CommonParameters>]

    Set-IpamAccessScope [-IpamSubnet] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]  [<CommonParameters>]

    Set-IpamAccessScope [-IpamBlock] -InputObject <ciminstance[]> [-AccessScopePath <string>] [-IsInheritedAccessScope] [-PassThru] [-CimSession <CimSession[]>] [-ThrottleLimit <int>] [-AsJob] [-WhatIf] [-Confirm]  [<CommonParameters>]

In het volgende voorbeeld wordt het toegangsbereik van de DNS-zone dublin.contoso.com gewijzigd van Dublin in Europa.

PS C:\Users\Administrator.CONTOSO> Get-IpamDnsZone -ZoneType Forward -ZoneName dublin.contoso.com

ZoneName             : dublin.contoso.com
ZoneType             : Forward
AccessScopePath      : \Global\Dublin
IsSigned             : False
DynamicUpdateStatus  : None
ScavengeStaleRecords : False

PS C:\Users\Administrator.CONTOSO> $a = Get-IpamDnsZone -ZoneType Forward -ZoneName dublin.contoso.com
PS C:\Users\Administrator.CONTOSO> Set-IpamAccessScope -IpamDnsZone -InputObject $a -AccessScopePath \Global\Europe -PassThru

ZoneName             : dublin.contoso.com
ZoneType             : Forward
AccessScopePath      : \Global\Europe
IsSigned             : False
DynamicUpdateStatus  : None
ScavengeStaleRecords : False