Get-DfsrFileHash (DFSR) (2024)

  • Reference
Module:
DFSR

Gets a file hash.

Syntax

Get-DfsrFileHash [-Path] <String[]> [<CommonParameters>]

Description

The Get-DfsrFileHash cmdlet gets a hash value identical to the one computed by the Distributed File System (DFS) Replication service for the specified file or folder during normal replication.Use this cmdlet to determine if you correctly populated a content set, or if a file is in sync between replication partners.

Examples

Example 1: Get a file hash

PS C:\> Get-DfsrFileHash -Path "C:\Rf01\Drawing2.vsd"Path FileHash---- --------C:\Rf01\Drawing2.vsd 6EA20E2D-EAA03FE3-22004718-F1D0FCE2

This command uses the Get-DfsrFileHash cmdlet to retrieve the simulated marshaled hash of the file C:\Rf01\Drawing2.vsd.

Example 2: Retrieve the hash of a folder and its contents

PS C:\> Get-DfsrFileHash -Path "C:\Rf01\*"Path FileHash---- --------C:\Rf01\archive 13B7D499-1D5B4DBF-8800A20D-52CA5845C:\Rf01\Drawing2.png EA22F7CF-AD58721C-29CB086B-CDE228BCC:\Rf01\Drawing2.vsd 6EA20E2D-EAA03FE3-22004718-F1D0FCE2

This command uses the Get-DfsrFileHash cmdlet to retrieve the hash of a folder and the hashes for the individual files in the folder.

Example 3: Retrieve the hash of a folder and its contents using recursion

PS C:\> Get-DfsrFileHash -Path (Get-ChildItem -Path "C:\Rf01" -Recurse).fullnamePath FileHash---- --------C:\Rf01\archive 13B7D499-1D5B4DBF-8800A20D-52CA5845C:\Rf01\Drawing2.png EA22F7CF-AD58721C-29CB086B-CDE228BCC:\Rf01\Drawing2.vsd 6EA20E2D-EAA03FE3-22004718-F1D0FCE2C:\Rf01\archive\Drawing1.png A32E700D-E541F7B7-241CD9B3-D1EA9D6CC:\Rf01\archive\Drawing1.vsd DA61DD74-52BDCB8E-2A793467-EB4BCED0

This command uses the Get-DfsrFileHash cmdlet to retrieve the hash of a folder and the hashes for the individual files in the folder.The command also uses the Get-ChildItem cmdlet to recursively find all files and folders in the path.

Example 4: Retrieve the hash of files with the *.png extension

PS C:\> Get-DfsrFileHash -Path (Get-ChildItem -Path "C:\Rf01" -Recurse -Filter *.png ).fullnamePath FileHash---- --------C:\Rf01\Drawing2.png EA22F7CF-AD58721C-29CB086B-CDE228BCC:\Rf01\archive\Drawing1.png A32E700D-E541F7B7-241CD9B3-D1EA9D6C

This command uses the Get-DfsrFileHash cmdlet to retrieve the hash of all files with a *.png extension.The command searches the folder path recursively.

Example 5: Retrieve and compare file hashes between two replicated folders

PS C:\> net use x: \\Srv01\c$\Rf01PS C:\> Get-DfsrFileHash x:\* | Out-File C:\Srv01.txtPS C:\> net use x: /dPS C:\> net use x: \\Srv02\e$\dataPS C:\> Get-DfsrFileHash x:\* | Out-File C:\Srv02.txtPS C:\> net use x: /dPS C:\> Compare-Object -ReferenceObject (Get-Content C:\Srv01.txt) -DifferenceObject (Get-Content C:\Srv02.txt) -IncludeEqualInputObject SideIndicator----------- ------------- ==Path ... ==---- ... ==x:\archive ... ==x:\Drawing2.vsd ... == == ==x:\Drawing2.png ... =>x:\Drawing2.png ... <=

This example retrieves and compares simulated file hashes for two replicated folders on different computers.

The first command maps a drive to the replicated folder on the first computer.

The second command uses the Get-DfsrFileHash cmdlet to retrieve the simulated file hashes for the contents of the folder.The command saves the output to a text file.

The third command deletes the mapped drive for the first computer.

The fourth command maps the same drive letter to the replicated folder on the second computer.

The fifth command uses the Get-DfsrFileHash cmdlet to retrieve the simulated file hashes for the contents of the folder.The command saves the output to a text file.

The sixth command deletes the mapped drive for the second computer.

The seventh command uses the Compare-Object cmdlet to compare the two output files and display the results.In this example, the Drawing2.png files differ.

Parameters

-Path

Specifies an array of paths to files or folders.You can use local paths, mapped drives, or UNC paths.

If you specify a file or folder with a wildcard character, this cmdlet calculates any matching files or folders individually.If you specify a folder path that ends with a wildcard descriptor, such as C:\Rf01*, the cmdlet calculates hashes for all immediate contents of that folder.This parameter does not support recursion of subfolders and their contents.

Type:String[]
Aliases:FullName
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

Inputs

String

Outputs

DfsrFileHash

Get-DfsrFileHash (DFSR) (2024)
Top Articles
Consensus Algorithms: Proof of Stake
Is Proof-of-Stake Really More Energy-Efficient Than Proof-of-Work?
Jack Doherty Lpsg
Using GPT for translation: How to get the best outcomes
Craigslist Cars Augusta Ga
Jennifer Hart Facebook
Mrh Forum
Summit County Juvenile Court
Ross Dress For Less Hiring Near Me
Find All Subdomains
Practical Magic 123Movies
Braums Pay Per Hour
Powerball winning numbers for Saturday, Sept. 14. Check tickets for $152 million drawing
Ess.compass Associate Login
Petco Vet Clinic Appointment
Sea To Dallas Google Flights
The Old Way Showtimes Near Regency Theatres Granada Hills
The Tower and Major Arcana Tarot Combinations: What They Mean - Eclectic Witchcraft
Air Quality Index Endicott Ny
Www.patientnotebook/Atic
Minnick Funeral Home West Point Nebraska
Drift Hunters - Play Unblocked Game Online
Elbert County Swap Shop
Workshops - Canadian Dam Association (CDA-ACB)
Victory for Belron® company Carglass® Germany and ATU as European Court of Justice defends a fair and level playing field in the automotive aftermarket
Skymovieshd.ib
Lbrands Login Aces
Encore Atlanta Cheer Competition
12657 Uline Way Kenosha Wi
Stubhub Elton John Dodger Stadium
Filmy Met
Obsidian Guard's Skullsplitter
Palmadise Rv Lot
Tributes flow for Soundgarden singer Chris Cornell as cause of death revealed
The Legacy 3: The Tree of Might – Walkthrough
Junior / medior handhaver openbare ruimte (BOA) - Gemeente Leiden
What Time Is First Light Tomorrow Morning
PA lawmakers push to restore Medicaid dental benefits for adults
Srg Senior Living Yardi Elearning Login
USB C 3HDMI Dock UCN3278 (12 in 1)
2007 Jaguar XK Low Miles for sale - Palm Desert, CA - craigslist
Birmingham City Schools Clever Login
Vindy.com Obituaries
Levi Ackerman Tattoo Ideas
Scythe Banned Combos
Tom Kha Gai Soup Near Me
Ohio Road Construction Map
Youravon Com Mi Cuenta
Myra's Floral Princeton Wv
Bedbathandbeyond Flemington Nj
Plasma Donation Greensburg Pa
Ssss Steakhouse Menu
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 6139

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.