Can you please post the code you use?
It’s impossible to test without it.
Also, if you post code, please use the insert code button
PLEASE READ BEFORE POSTING! Read if you're new to the PowerShell forum! .