-
- Influencer
- Posts: 22
- Liked: 1 time
- Joined: Oct 12, 2016 3:17 pm
- Full Name: Nan Zhang
- Contact:
Two *-VBRViReplicaJob cmdlets -suffix issue
Hi,
I want to create a Replication job that has the suffix set to blank. The two cmdlet *-VBRViReplicaJob (Add- and Set-) doesn't accept empty string or null argument for the -suffix argument. But this is exactly what I want to do. Is there work-around this? This can be done through the GUI, so why put this restriction in the cmdlets?
Thanks,
Nan
I want to create a Replication job that has the suffix set to blank. The two cmdlet *-VBRViReplicaJob (Add- and Set-) doesn't accept empty string or null argument for the -suffix argument. But this is exactly what I want to do. Is there work-around this? This can be done through the GUI, so why put this restriction in the cmdlets?
Thanks,
Nan
-
- Product Manager
- Posts: 20408
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Two *-VBRViReplicaJob cmdlets -suffix issue
Have you tried to input space between quotes? I think this way a blank suffix will be created:
Thanks.
Code: Select all
asnp veeampssnapin
$Job = Get-VBRJob -name "Name of your replication job"
Set-VBRViReplicaJob -Job $Job -Suffix " "
-
- Influencer
- Posts: 22
- Liked: 1 time
- Joined: Oct 12, 2016 3:17 pm
- Full Name: Nan Zhang
- Contact:
Re: Two *-VBRViReplicaJob cmdlets -suffix issue
Thanks! The suggestion worked. And thanks for the code.
It is not intuitive. I am wondering if you can pass this quirk to writers of cmdlets to remove that restriction from the -suffix parameter in future releases.
It is not intuitive. I am wondering if you can pass this quirk to writers of cmdlets to remove that restriction from the -suffix parameter in future releases.
-
- Product Manager
- Posts: 20408
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Two *-VBRViReplicaJob cmdlets -suffix issue
The information has been provided to dev team. For now, kindly, leverage the proposed workaround. Thanks.
-
- Expert
- Posts: 249
- Liked: 38 times
- Joined: Jun 15, 2009 10:49 am
- Full Name: Gabrie van Zanten
- Contact:
[MERGED] Create replica job with empty Suffix
Hi
Trying to create replica jobs between datacenters, but in the new datacenter I don't want any suffix on the VM. I can set this through the GUI to a blank value, but the Powershell command doesn't accept the -Suffix value to be an empty string.
Anyway to fix this?
Gabrie
Trying to create replica jobs between datacenters, but in the new datacenter I don't want any suffix on the VM. I can set this through the GUI to a blank value, but the Powershell command doesn't accept the -Suffix value to be an empty string.
Anyway to fix this?
Gabrie
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Create replica job with empty Suffix
You can manually update the job settings using Set-VBRJobOptions immediately after creating the new job. Crude example:
Code: Select all
$newrepljob = Find-VBRViEntity -Name "dc01" | Add-VBRViReplicaJob -Name "DC Replication Job" -Server $server -Datastore $datastore -ResourcePool $resourcepool -Folder $folder -Description "DC server replication"
$newrepljob.ViReplicaTargetOptions.ReplicaNameSuffix = $null
Set-VBRJobOptions -Job $newrepljob -Options $newrepljob.Options
-
- Product Manager
- Posts: 20408
- Liked: 2299 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Two *-VBRViReplicaJob cmdlets -suffix issue
Setting a space between two quotes should be a way to go. Thanks.but the Powershell command doesn't accept the -Suffix value to be an empty string.
Who is online
Users browsing this forum: Semrush [Bot] and 10 guests