Skip to main content

Manually start a data deduplication with PowerShell

In some cases you may want to manually start an deduplication process on your Windows Server 2012 storage devices that are configured for data deduplication.

Here we see the same set of files located in three different areas of our e: drive.

clip_image001

To do this, utilize PowerShell.

Type Get-DedupVolume

clip_image002

Since we have not performed any deduplication, we do not have any savings.

Type: Start-DedupJob –Full –Path e: -Type Optimization

You can get the results by typing Get-DedupJob

clip_image003

The Data Deduplication Service is set to manual because it is either activated via a scheduled task or by PowerShell

clip_image004

By executing Get-DedupStatus –Path e:

clip_image005

Since only files that are greater than 32KB can be optimized by data deduplication, only the files that start with Colors will be processed. The total size of these files are 1053KB per instance. The SavedSpace attribute reflects the removed duplicate data plus the reference pointers for the removed data to a full copy of that data.

Comments

Anonymous said…
That's a great post.
Thanks a lot!
Anonymous said…
Great post.
Thanks!!
Anonymous said…
Just used this and it worked great! Thanks for the info!
Unknown said…
Thanks for this article. Excellent job
Anonymous said…
Brilliant, saves waiting for the schedule to kick in after 3 days

:)

Popular posts from this blog

Determine which Domain Controller a client is connected to with PowerShell

When a Windows client comes online, it must find a domain controller to bind to.  Either through a static configuration or DHCP, the client will request a list of all Domain Controllers in the domain from a DNS server.  Once the list is received, the client will randomly go through the list to find a DC that will respond.  Once the client has authenticated itself with the DC, the DC will transmit the site information to the client.  The site information will contain the site name, the subnet(s) associated with that site, and any domain controllers in that site.  The client will then take a look at it’s own IP address to determine which site it is in.  From the list of DCs in the same site, it will attempt to bind to one of those DCs to receive it’s Group Policies.You can use PowerShell and WMI to locate the domain controller that a client is connected to.Get-WMIObject Win32_NTDomainLook for the DomainControllerName property.

Test to see what that data type of a value is in PowerShell

PowerShell has a comparison operator called –is.  The –is operator simply response True or False when you use it to verify the data type of a value.  The valid data types in PowerShell are:
[string]    Fixed-length string of Unicode characters
[char]      A Unicode 16-bit character
[byte]      An 8-bit unsigned character
[int]       32-bit signed integer
[long]      64-bit signed integer
[bool]      Boolean True/False value
[decimal]   A 128-bit decimal value
[single]    Single-precision 32-bit floating point number
[double]    Double-precision 64-bit floating point number
[DateTime]  Date and Time
[xml]       Xml object
[array]     An array of values
[hashtable] Hashtable object

Below is a script that will use –is to test some values.
$String="Hello"$Boolean=$True$Int=15Write-Host"Test for string"$String-is [String] $Boolean-is [String] $Int-is [String] Write-Host" "Write-Host"Test for Boolean"…

Where did a User’s Account Get Locked Out?

Updated: May 15, 2015
When this article was originally published, two extra carriage returns were add causing the code to malfunction.  The code below is correct.  

My client for this week’s PowerShell class had a really interesting question. They needed to know where an account is being locked out at. OK, interesting. Apparently users hop around clients and forget to log off, leading to eventual lock out of their accounts. The accounts can be unlocked, but are then relocked after Active Directory replication.
This problem is solved in two parts. The first one is to modify the event auditing on the network. The second part is resolved with PowerShell.
The first part involves creating a group policy that will encompass your Domain Controllers. In this GPO, make these changes.
Expand Computer Configuration \ Policies \ Windows Settings \ Security Settings \ Advanced Audit Policy Configuration \ Audit Policies \ Account ManagementDouble click User Account ManagementCheck Configure the f…