VMware Cloud Community
ranjitcool
Hot Shot
Hot Shot
Jump to solution

Credentials to pull user name and put in path

Hey Guys,

How do i do this?

$Object | ConvertTo-HTML -head $a -body $b | Out-File C:\Users\$creds.UserName\Desktop\v7nohotaddlist.htm

I am trying to make sure the html will land on the desktop of who ever user executes the ps script.

Please advice.

Thanks a ton

RJ

Please award points if you find my answers helpful Thanks RJ Visit www.rjapproves.com
Reply
0 Kudos
1 Solution

Accepted Solutions
Hosted201110141
Enthusiast
Enthusiast
Jump to solution

I'm not 100%, but couldn't you use:

$Object | ConvertTo-HTML -head $a -body $b | Out-File ~\Desktop\v7nohotaddlist.htm

View solution in original post

Reply
0 Kudos
2 Replies
Hosted201110141
Enthusiast
Enthusiast
Jump to solution

I'm not 100%, but couldn't you use:

$Object | ConvertTo-HTML -head $a -body $b | Out-File ~\Desktop\v7nohotaddlist.htm

Reply
0 Kudos
ranjitcool
Hot Shot
Hot Shot
Jump to solution

Crap,

Thats right, that worked!

Thanks and points awarded :smileygrin:

Please award points if you find my answers helpful Thanks RJ Visit www.rjapproves.com
Reply
0 Kudos