Forum Discussion
smellitgood
Oct 06, 2024Copper Contributor
PowerShell data explanation and advice
Hi everyone. Not even sure how to ask and maybe it seems dramatic but I am reaching out for a little help here. Can someone help me understand this data I copied from PowerShell? I typed the same com...
sdtslmn
Oct 30, 2024MCT
Your PowerShell output is showing user account details like usernames and SIDs, but you're encountering some issues with commands like wmic. Here's the key takeaway:
- whoami /user and [Security.Principal.WindowsIdentity]::GetCurrent() correctly display the current user and SID.
- wmic useraccount errors: Use actual usernames like wmic useraccount where name='smell' get domain,name,sid instead of %username%.
- File path errors: To change directories, use Set-Location -Path C:\Users\Public, not direct path execution.
For user account info, stick with Get-LocalUser or Get-CimInstance.