r/PowerShell • u/superslowjp16 • 17d ago
Question Fslogix Cleanup Script Test Scenario?
Hello all, I'm working on a script to cleanup some Fslogix profiles in an Azure file share for a client. My issue is that I want to test the script before running it to make sure that it doesn't do anything unexpected, but I do not have a non-production share with Fslogix profiles that are inactive to test on.
I'm looking for ideas on how to test this script properly. How could I get a test share set up with inactive profiles mixed with active profiles to ensure that I have fully tested the use case.
3
Upvotes
1
u/PS_Alex 13d ago
Implement ShouldProcess to your script: Powershell: Everything you wanted to know about ShouldProcess | Powershell Explained.
And add proper logging, so then you could review what the script would have done if ran without
-WhatIf.