Powershell advice required for Reset-HvVmChangeTracking cmd

PowerShell script exchange

Powershell advice required for Reset-HvVmChangeTracking cmd

Veeam Logoby Mr Dudeman » Fri Apr 21, 2017 6:01 am

Hi All,

I am trying to flush change tracking data on a CSV by using VEEAM PowerShell; as per the following -

Reset-HvVmChangeTracking -Server [SVR_NAME] -VMName [VM_NAME]

However instead of flushing the CSV I see the message below -

Code: Select all
Reset-HvVmChangeTracking : Cannot process argument transformation on parameter 'Server'. Microsoft SQL server hosting
the configuration database is currently unavailable. Possible reasons are heavy load, networking issue, server reboot,
or hot backup.
Please wait, and try again later.
Error information:
Microsoft SQL server hosting the configuration database is currently unavailable. Possible reasons are heavy load,
networking issue, server reboot, or hot backup.
Please wait, and try again later.
Error information:
SQL server is not available
SQL server is not available
At line:1 char:34
...


Can anybody please suggest how I can go about resolving this issue?

Kind Regards,

Davo
Mr Dudeman
Influencer
 
Posts: 20
Liked: never
Joined: Wed Mar 08, 2017 10:19 pm
Full Name: David Dartnell

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby PTide » Fri Apr 21, 2017 10:28 am

Hi,

Have you checked this KB already?

Thanks
PTide
Veeam Software
 
Posts: 3248
Liked: 272 times
Joined: Tue May 19, 2015 1:46 pm

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby Mr Dudeman » Sun Apr 23, 2017 10:45 pm

Hi PTide,

Thanks for responding to my post; I am running the PowerShell commands on the Server which contains the configuration database, therefore I don't think that the KB applies.

Do you have any other suggestions?

Kind Regards,

Davo
Mr Dudeman
Influencer
 
Posts: 20
Liked: never
Joined: Wed Mar 08, 2017 10:19 pm
Full Name: David Dartnell

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby PTide » Mon Apr 24, 2017 9:28 am

So, VBR server and its configuration database are on the same server, is that correct? If so then the first thing to check is if the name of the server is resolved correctly. Also, what do you pass as SVR_NAME, is it an actual server name, or an object? You should pass the latter, if that's not the case then please check Example 1 in the documentation:

The server object is obtained with Get-VBRServer and assigned to the variable beforehand.


Thanks
PTide
Veeam Software
 
Posts: 3248
Liked: 272 times
Joined: Tue May 19, 2015 1:46 pm

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby v.Eremin » Mon Apr 24, 2017 12:53 pm

Can you also try to reset CBT manually and see whether the issue is reproduced? Check the last points in this KB article. Thanks.
v.Eremin
Veeam Software
 
Posts: 13728
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby Mr Dudeman » Tue Apr 25, 2017 11:14 pm

Hi PTide,

I had not created a 'SERVER' variable using Get-VBRServer! Doing so has fixed the issue that I was encountering.

However my new challenge is that I have too many VMs on each host to manually process (one line at a time).

For this reason I created a CSV file with all of the VMs, and now would like to use the file as an argument to the Reset-HvVmChangeTracking cmdlet.

Towards this end I created the following line of script -

Code: Select all
Reset-HvVmChangeTracking -Server $SERVER -VMName | Foreach {C:\temp\Server_Name.csv $_.Name}


However I am receiving an error message, to the effect of Specify a parameter of type 'System.String'...

I am quite new to PowerShell so this is difficult for me to resolve.

Can you offer any suggestions?

Kind Regards,

Davo
Mr Dudeman
Influencer
 
Posts: 20
Liked: never
Joined: Wed Mar 08, 2017 10:19 pm
Full Name: David Dartnell

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby Mike Resseler » Wed Apr 26, 2017 5:38 am

Hi Davo,

I would create a script and do it like this:

Code: Select all
$FilePath = "locationofCSVfile"

$VMS = Import-CSV $FilePath
ForEach ($Row in $VMS) {
Reset-HvVmChangeTracking -Server $SERVER -VMName $Row.name
}

Mike Resseler
Veeam Software
 
Posts: 3382
Liked: 384 times
Joined: Fri Feb 08, 2013 3:08 pm
Location: Belgium, the land of the fries, the beer, the chocolate and the diamonds...
Full Name: Mike Resseler

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby v.Eremin » Wed Apr 26, 2017 6:59 pm

I don't think VMname is mandatory parameter, which means that if you just run Reset-HVVMChangeTracking without any -VMName parameter, it will reset CBT for all VMs residing on the given server.
v.Eremin
Veeam Software
 
Posts: 13728
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Powershell advice required for Reset-HvVmChangeTracking

Veeam Logoby Mr Dudeman » Wed Apr 26, 2017 9:11 pm

Thanks Mike :D
Mr Dudeman
Influencer
 
Posts: 20
Liked: never
Joined: Wed Mar 08, 2017 10:19 pm
Full Name: David Dartnell


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest