Splat Command issue with AD Module

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
PsCustomObject-2
Posts: 16
Last visit: Tue Oct 30, 2018 8:04 am

Splat Command issue with AD Module

Post by PsCustomObject-2 »

PowerShell Studio 2018 v5.5.152
64 bit version of product:
Operating system:
64 bit Windows 10 1703

Hello,

as per subject I was wondering if anybody faced something like this, I just noticed in my code while debugging, I have a simply AD query like this

Code: Select all

[Codebox=powershell file=Untitled.ps1]$user = GEt-ADUser -Identity $myUser -properties $userProperties -Server $myAdServer[/Codebox]
When I use the Splat Command feature command is indeed splatted but I get in place of the -Identity parameter is AuthType

Code: Select all

[Codebox=powershell file=Untitled.ps1]
		$paramGetADUser = @{
			AuthType    = $userEmployeeId
			Properties  = 'samAccountName'
			Server	    = $adServer
		}
		
		$user = Get-ADUser @paramGetADUser[/Codebox]
I have tested this in a brand new script but could not reproduce consistently but seems to affect larger scripts and only, for what I could notice, the AD module (script where I've spotted this "bug" is around 8k lines and seems to have affected couple of occurrences of the same cmdlet).

I have now sanitized my script so no big deal, I will pay attention next time, but wondering if it is something someone else faced or you guys @Sapien are aware of.

Thanks!
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Splat Command issue with AD Module

Post by davidc »

We are not aware of this issue and have not been able to reproduce it. Context can really matter, so if you encounter it again, please upload a sample script here the with necessary steps to reproduce the issue:

https://www.sapien.com/support/upload
David
SAPIEN Technologies, Inc.
This topic is 5 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.