Question 2.  Out of curiosity, if you have time.

Different formatting/results if I run the script locally or remotely.  (The
PS Script being the exact same command).  Yet both still work and give me
what I need.

 

If I run it on my machine:

Get-PSDrive | where {$_.Provider.Name -eq "FileSystem"} | Select Root,
Description

 

Root                                                        Description

----                                                        -----------

C:\                                                         SYSTEM

D:\                                                         MUSIC

E:\                                                         DATA

F:\

G:\

K:\

T:\                                                         USB Backup

 

If I run it remotely:

powershell.exe -noexit invoke-command -computername nas01
"E:\RolloutsScripts\NASScripts\ListVolume.ps1"

 

Root               : C:\

Description        : SYSTEM

PSComputerName     : nas01

RunspaceId         : 2e52d81b-cd50-4966-a84a-c347551eff93

PSShowComputerName : True

 

Root               : D:\

Description        : DATA

PSComputerName     : nas01

RunspaceId         : 2e52d81b-cd50-4966-a84a-c347551eff93

PSShowComputerName : True

 

Root               : E:\

Description        : SATA01

PSComputerName     : nas01

RunspaceId         : 2e52d81b-cd50-4966-a84a-c347551eff93

PSShowComputerName : True

 

Root               : S:\

Description        : DAILYSATA

PSComputerName     : nas01

RunspaceId         : 2e52d81b-cd50-4966-a84a-c347551eff93

PSShowComputerName : True

 

 

From: Michael B. Smith [mailto:[email protected]] 
Sent: Wednesday, August 17, 2011 1:36 PM
To: NT System Admin Issues
Subject: RE: Get-PSDrive

 

Get-PsDrive | Select Root, Description

 

Regards,

 

Michael B. Smith

Consultant and Exchange MVP

http://TheEssentialExchange.com

 

From: Sam Cayze [mailto:[email protected]] 
Sent: Wednesday, August 17, 2011 2:31 PM
To: NT System Admin Issues
Subject: Get-PSDrive

 

Anyway to get this PS function to list the disk's labels?  If not, is there
another command that will?  Looking at WMI next.

 

Tia,

Sam

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to