Silly me....

It looks to me as if you run powershell from an elevated prompt with
"/netonly", it's gonna use Windows defaults. My profile is set up the
way I want it, but even after copying those settings administratively
through the regional settings in control panel, it looks as if the
elevated powershell session gets default settings.

Running in non-elevated (which is fine, as it's just a query) returns
the expected results.

Kurt

On Mon, Mar 2, 2015 at 5:00 PM, Webster <[email protected]> wrote:
> Try:
>
> $user = get-aduser -id userid -properties accountexpirationdate
>
> (get-date $user. Accountexpirationdate -f d)
>
> Webster
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> On Behalf Of Kurt Buff
> Sent: Monday, March 02, 2015 7:49 PM
> To: [email protected]
> Subject: [powershell] Date output format
>
> When I run the following:
>
> get-aduser -id userid -properties accountexpirationdate
>
> or similar, I see that the date output is in the form of "2/27/2015 5:00:00 
> PM".
>
> This, in spite of the fact that my machine settings are for
> "2015-02-27 17:00:00".
>
> Is that because the DCs aren't set the same as my computer, or is it internal 
> to AD, or something else? And can I put something in my profile at least to 
> adjust that?
>
> Kurt
>
>
> ================================================
> Did you know you can also post and find answers on PowerShell in the forums?
> http://www.myitforum.com/forums/default.asp?catApp=1
>
>
> ================================================
> Did you know you can also post and find answers on PowerShell in the forums?
> http://www.myitforum.com/forums/default.asp?catApp=1


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

Reply via email to