Add-SCVMNetworkGateway
Menambahkan gateway jaringan komputer virtual ke VMM.
Sintaks
Add-SCVMNetworkGateway
[-VMMServer <ServerConnection>]
-VMNetwork <VMNetwork>
[-RequiresVPN]
[-RequiresNAT]
[-EnableBGP <Boolean>]
[-AutonomousSystemNumber <UInt32>]
-Name <String>
[-Description <String>]
[-RoutingIPSubnet <String>]
[-FabricRole <FabricRole>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Add-SCVMNetworkGateway
[-VMMServer <ServerConnection>]
-VMNetwork <VMNetwork>
-NetworkGateway <NetworkServiceBase>
[-EnableBGP <Boolean>]
[-AutonomousSystemNumber <UInt32>]
-Name <String>
[-Description <String>]
[-RoutingIPSubnet <String>]
[-FabricRole <FabricRole>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Deskripsi
Cmdlet Add-SCVMNetworkGateway menambahkan gateway jaringan komputer virtual ke Virtual Machine Manager (VMM).
Contoh
Contoh 1: Membuat gateway jaringan komputer virtual
PS C:\> $ContosoNetworkGateway = Get-SCNetworkGateway -Name "ContosoNetworkGateway"
PS C:\> $VmNetworkGateway = Add-SCVMNetworkGateway -Name "VMNetworkGateway" -EnableBGP $True -NetworkGateway $ContosoNetworkGateway -VMNetwork $VmNetwork -AutonomousSystemNumber "1000" -RoutingIPSubnet "10.251.251.0/29"
Perintah pertama mendapatkan gateway jaringan bernama ContosoNetworkGateway, lalu menyimpannya dalam variabel $ContosoNetworkGateway.
Perintah kedua membuat gateway jaringan komputer virtual untuk gateway di $ContosoNetworkGateway.
Contoh 2: Membuat gateway jaringan komputer virtual (IPv6)
Catatan
Contoh ini berlaku dari VMM 2019 UR2 dan yang lebih baru.
PS C:\> $ContosoNetworkGateway = Get-SCNetworkGateway -Name "ContosoNetworkGateway"
PS C:\> $VmNetworkGateway = Add-SCVMNetworkGateway -Name "VMNetworkGateway" -EnableBGP $True -NetworkGateway $ContosoNetworkGateway -VMNetwork $VmNetwork -AutonomousSystemNumber "1000" -RoutingIPSubnet "10.251.251.0;FD4A:293D:184F:382C::/64"
Perintah pertama mendapatkan gateway jaringan bernama ContosoNetworkGateway, lalu menyimpannya dalam variabel $ContosoNetworkGateway.
Perintah kedua membuat gateway jaringan komputer virtual untuk gateway di $ContosoNetworkGateway.
Parameter
-AutonomousSystemNumber
Menentukan Nomor Sistem Otonom (ASN).
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
Menentukan deskripsi untuk gateway jaringan komputer virtual.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableBGP
Menunjukkan apakah Border Gateway Protocol (BGP) diaktifkan.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FabricRole
Menentukan peran fabric.
Type: | FabricRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
Menentukan bahwa kemajuan pekerjaan dilacak dan disimpan dalam variabel yang dinamai oleh parameter ini.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Menentukan nama objek VMM.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkGateway
Menentukan objek gateway jaringan.
Untuk mendapatkan objek gateway jaringan, gunakan cmdlet Get-SCNetworkGateway .
Type: | NetworkServiceBase |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUser
Menentukan nama pengguna. Cmdlet ini beroperasi atas nama pengguna yang ditentukan parameter ini.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-OnBehalfOfUserRole
Menentukan peran pengguna. Untuk mendapatkan peran pengguna, gunakan cmdlet Get-SCUserRole . Cmdlet ini beroperasi atas nama peran pengguna yang ditentukan parameter ini.
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
Menentukan ID tip Performa dan Pengoptimalan Sumber Daya (tip PRO) yang memicu tindakan ini. Parameter ini memungkinkan Anda mengaudit tips PRO.
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequiresNAT
Menunjukkan bahwa koneksi memerlukan terjemahan alamat jaringan (NAT).
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequiresVPN
Menunjukkan bahwa jaringan privat virtual (VPN) diperlukan.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RoutingIPSubnet
Menentukan subnet IP perutean untuk gateway jaringan komputer virtual.
Catatan
Dari 2019 UR2 dan yang lebih baru, alamat IPV4 dan IPV6 yang dipisahkan oleh ';' dapat diteruskan ke parameter ini.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
Menunjukkan bahwa pekerjaan berjalan secara asinkron sehingga kontrol segera kembali ke shell perintah.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Menentukan objek server VMM.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMNetwork
Menentukan objek jaringan komputer virtual.
Untuk mendapatkan objek jaringan komputer virtual, gunakan cmdlet Get-SCVMNetwork .
Type: | VMNetwork |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |