October 9, 2017 is a day Chris Foerster would like to take back.

It’s the day a video of him snorting a white powdery substance in the Miami Dolphins’ facility went viral. Shortly after, Foerster resigned, and he has not coached again in the NFL.

Technically, Foerster still isn’t a coach, but rather a consultant for the 49ers, a role he has held since the 2018 offseason.

ESPN’s Jenna Laine first reported Foerster's role with the 49ers on Friday.

After the news broke, 49ers coach Kyle Shanahan spoke to NBC Sports Bay Area exclusively about Foerster, his role with the team and why he wants to help him on his path back to redemption. The two men spent four seasons together in Washington, where Shanahan was the offensive coordinator from 2010 to 2013.

“We found out about it [the video] when the whole world found out about it,” Shanahan said. “When it happened, we were as shocked as anyone, from my wife to anybody. It’s nothing I’d want to stick up for. These are extremely bad things that I know he’s not proud of, and I’m not proud of.

“He did something extremely stupid, and since then, he has hit rock bottom. He went to rehab for 60 days, and then he was in a 90-day outpatient rehab. For the last two years, he’s been in a 12-step program that he’s been to every single night seven days a week.”

Shanahan also explained why the 49ers didn’t make Foerster’s role with the team public from the beginning.

“If he was fully on our coaching staff, going to practice and going to games, I understand that it’s something that I’d have to address, but he’s not,” Shanahan said. “He’s in a consulting role. A lot of teams have consultants. I understand the ramifications of that, and why people will ask why I didn’t say anything about it.”

Shanahan made his feelings about Foerster’s actions very clear, which is why giving him a second chance does not come without restrictions.

“He is still in a consulting role because I do understand the seriousness of this matter,” Shanahan said. “We’re trying to ease him back in. I understand how big of a problem he did have. I also understand what he’s doing in committing to fix that problem. We’re trying to give him a chance to get back on track.

“I also understand that people make huge mistakes, and ... he’s trying to make amends and he’s trying to make it right.”

Technically, NFL rules state that a consultant without a coaching or team contract is allowed to participate on the field during practice but not during games. Foerster, however, has been relegated to watching film and attending position group and team meetings.

Shanahan explained that it has been a gradual process in which Foerster has had to earn his way back into a role with the team. It was a calculated risk Shanahan was willing to take.

“To help him with a job and make some money, and also because he’s good at it, we gave him a consulting role last year,” Shanahan said. “He helped us from afar with advanced scouting reports and things like that. He would just look at teams the week ahead and send us some information, all typed up because he was never in town.

“This year, we took it a step forward. We brought him in part-time but still a consultant, but he is in the office at times. He’s able to do things like watch film with us, but he’s still in a consulting role.”

Shanahan and the 49ers are holding Foerster to a high standard — possibly higher than anyone else in the building. Thus far, he has done everything they have asked of him.

"We are not going to act like flat out it didn’t happen and just let him back in right away,” Shanahan said. “We are taking a very slow process, and that’s why we did the first year the way we did and why it led to the second year.”

Ultimately, Shanahan and the 49ers have given Foerster a chance to rebuild his professional life while he tries to piece back together his personal life as well.

“He’s done that exactly the right way for two years,” Shanahan said. “We will see if he continues to do that, and then we will reassess that after this year. If it continues to go well, I think he has a chance to get his life back on track. And that’s really all we are trying to do.”

Shanahan believes that no matter where Foerster is, as long as he stays on the straight and narrow, he is a valuable asset.

[RELATED: 49ers vs. Chiefs live stream: How to watch NFL preseason game online]

“Whether it helps him with the 49ers or helps him somewhere else, I know he’s a good coach who went through a very hard time, made some huge mistakes that he is dealing with, and deserves to deal with those because they were messed-up things,” Shanahan said. “I also know how he feels about those mistakes and what he’s done over the last two years to try and make amends, and I know he’s continuing to do that.

“I’m just pulling for him that he can keep up with it. If he does keep up with it, then whether it’s with the 49ers or with someone else, you’re going to get a good person and a good coach. I’m just really hoping that he can get back to being the healthy guy I knew in Washington, and that’s what I see so far.”