Accessing Files Mac from Windows SMB Grayed Out

After migrating our File Share to Server 2012 R2 using DFS Replication, I had a Mac user indicate that folders he usually had access to were grayed out and unable to open the folder.

Screen Shot 2014-10-30 at 10.17.59 AM

First thing I noticed was that the date was January 24, 1984. Every folder that was grayed out had the same date.

**Fact, On January 24, 1984 the Apple Macintosh was introduced**

In order to find out what other files were grayed out, I went to PowerShell, rather than manually searching each folder.

Get-ChildItem -Recurse -Path '\\server\share' | Where-Object {$_.CreationTime -like '*1984*'} | Format-List FullName, CreationTime

This outputs each folder that has the 1984 creation date. If you want to export that to a file, just add a pipe and Out-File.

The command could take quite some time to run depending on the size of your file share.

Since we now have the information we need, we need to change the CreationDate. Since I don’t have time to touch every file, below is the PowerShell script that accomplished it for me.

 

## Simple check to search folders
Get-ChildItem -Recurse -Path '\\server\share' | Where-Object {$_.CreationTime -like '*1984*'} | Format-List FullName, CreationTime

## Get Current Date of Computer
$Date = Get-Date

## Same as before, but putting into variable, notice "|" at the end of the line
$File = Get-ChildItem -Recurse -Path '\\server\share' | Where-Object {$_.CreationTime -like '*1984*'} |
ForEach-Object {
  $_.CreationTime = $Date
}

Here is the folder structure after running the script.

Screen Shot 2014-10-30 at 11.08.25 AM

** This script comes with zero warranty and I highly recommend testing and backing up your environment before running.

Advertisements

3 thoughts on “Accessing Files Mac from Windows SMB Grayed Out

  1. Dude you rock! This worked perfectly.

    I had the exact same issue after migrating a DFS share via robocopy to another volume on the same server. The creation date of random folders had changed to Jan 24 1984 preventing Mac users from opening them (seeing them as ghost or locked). Running your script resolved the issue for entire share. Thanks for sharing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s