Microsoft Virtualization Discussions

Changing Dedupe Schedules

AJECKERLE
4,168 Views

Currently, all my volumes dedupe at midnight (default). We're having some backup windows extend into that time so I want to bump the dedupe schedule out to 2a.

I'm using the following command to get all volumes with Dedupe enabled: Get-NaVol | where { $_.DedupeEnabled -eq "True" }

Then I'm trying to pipe that result into Set-NaSis but it looks like the result of the Get-NaVol command is not the correct object type via this error:

Set-NaSis : The input object cannot be bound to any parameters for the command either because the command does not take

pipeline input or the input and its properties do not match any of the parameters that take pipeline input.

Is my theory correct? Either way, what would I do to get accomplish my goal. If there's a better way altogether I'm definitely ok with that. Just trying to learn some powershell in the process

Adam

1 ACCEPTED SOLUTION

AJECKERLE
4,168 Views

It is cliche, but I found the answer just after I posted. If I added a ForEach-Object this seems to work. I found this post which helped me out - http://social.technet.microsoft.com/Forums/en/ITCG/thread/94cadfc3-d077-4200-b81b-75f31906082d

So, just in case anyone needs this as well, here is the full command to change dedupe schedules on all volumes with dedupe enabled:

$result = get-NaVol | where { $_.DedupeEnabled -eq "True" }

$result | ForEach-Object { Set-NaSis sun-sat@2 }

If there's a better way or if someone wants to rip apart my syntax feel free. Not sure why I didn't just do it in one line...

View solution in original post

1 REPLY 1

AJECKERLE
4,169 Views

It is cliche, but I found the answer just after I posted. If I added a ForEach-Object this seems to work. I found this post which helped me out - http://social.technet.microsoft.com/Forums/en/ITCG/thread/94cadfc3-d077-4200-b81b-75f31906082d

So, just in case anyone needs this as well, here is the full command to change dedupe schedules on all volumes with dedupe enabled:

$result = get-NaVol | where { $_.DedupeEnabled -eq "True" }

$result | ForEach-Object { Set-NaSis sun-sat@2 }

If there's a better way or if someone wants to rip apart my syntax feel free. Not sure why I didn't just do it in one line...

Public