32 or 64 bit version of product: 64bit
Operating system: Win 10 1903
32 or 64 bit OS: 64bit
Hello,
I'm reposting this as it seems my reply to the other thread went unnoticed, as per subject with the latest build I'm still observing issues with the way PowerShell studio pefrom command splatting.
If I try to splat the following code:
Code: Select all
$exOnlineSession = New-ExOnlineSession -UserName $userName -UserPassword (New-StringDecryption -EncryptedString $azurePassword)
Code: Select all
$paramNewExOnlineSession = @{
UserName = $userName
UserPassword = (New-StringDecryption -EncryptedString $azurePassword)
}
$exOnlineSession = New-ExOnlineSession @paramNewExOnlineSession)
Code: Select all
$paramNewExOnlineSession = @{
UserName = $userName
UserPassword = (New-StringDecryption -EncryptedString $azurePassword)
}
$exOnlineSession = New-ExOnlineSession @paramNewExOnlineSession
# Or even
$exOnlineSession = (New-ExOnlineSession @paramNewExOnlineSession)
Code: Select all
# Do something
[void]::(Enable-RemoteMailbox -Identity $Identity -Archive)
# Splatting will result in
$paramEnableRemoteMailbox = @{
Identity = $Identity
Archive = $true
}
# Extra trailing space after the @parameter
[void]::(Enable-RemoteMailbox @paramEnableRemoteMailbox )
# It should be
[void]::(Enable-RemoteMailbox @paramEnableRemoteMailbox)
Thanks for looking into this!