I am using “$User=Get-LoggedOnUser”
and I would like to use this:
Copy-File -Path “$dirSupportFiles\com.iliumsoft.ewallet.plist” -destination “C:\Users$user\AppData\Roaming\com.iliumsoft.ewallet.plist”
But instead I get this:
[02-09-2018 17:54:36.352] [Post-Installation] [Copy-File] :: Copy file in path [C:\Users\ME\Desktop\Ilium Software\eWallet\8.3.5.35516\x86\SupportFiles\com.iliumsoft.ewallet.plist] to destination [C:\Use
rs\PSADT.QueryUser+TerminalSessionInfo\AppData\Roaming].
Thoughts? I am pretty new to PoSh in general…
Thanks!
Get- LoggedOnUser
Synopsis: Get session details for all local and RDP logged on users.
Description:
Get session details for all local and RDP logged on users using Win32 APIs. Get the following session details: NTAccount, SID, UserName, DomainName, SessionId, SessionName, ConnectState, IsCurrentSession, IsConsoleSession, IsUserSession, IsActiveUserSession, IsRdpSession, IsLocalAdmin, LogonTime, IdleTime, DisconnectTime, ClientName, ClientProtocolType, ClientDirectory, ClientBuildNumber
So how can I use this to insert the currently logged on user?
I will deploy this via SCCM with the condition that a user “must be logged in”. So technically I only need the currently logged in user. I’ve done this many times in batch by querying the registry and getting "username@domain.com", and then trimming off "@domain.com."
I could also make two deployments: 1) Workstation only deployment (software install) that has a dependent 2) user only deployment - I can copy the file in “user context” in which I can use the username variable.
With all that said, I’d also like to move all “non-standard” deployments to PSADT as a standard. I don’t want a mixture of batch/VBS/PS/PSADT as eventually I’ll leave and I don’t want the next person having to deal with different solutions.
Maybe copying to all profiles including default is a good idea. This software meets an SEC requirement and must be on all end user devices.
I will try the above and post back Monday.
Thanks everyone for you’re input - much appreciated.
I am using Jim’s suggestion as it really solves any issues I currently have and may encounter.
I definitely need to start learning PoSh! Thanks Jim and thanks everyone else for the quick replies. I am now able to deploy this software domain-wide with no issues.
This is a nice solution but I noticed, deployed by SCCM, that all existing profiles are updated except the current user profile?
Is there a solution to include the current user profile?