Jump to content

Powershell Experts Oka chinna doubt


Recommended Posts

Posted

multiple rows ni ela filter cheyyali

Get-WMIObject win32_logicaldisk -ComputerName servername  -Filter  "DeviceID='C:'"

ippudu D drive lo ni information kuda kavale antey ela

Posted
3 minutes ago, chitti_naidu said:

Get-WMIObject win32_logicaldisk -ComputerName Servername  | format-table

andhulo C,D,E  drives unnai bro i need only C,D drive info not full information

Posted
1 minute ago, AmazingSpiderReddy said:

Use -and / -or operations on filter

Tried not working...... kottha powershell ki konchem evvarina filter chesi pampandi vayya please  

Posted

Get-WMIObject win32_logicaldisk -ComputerName ServerName | Where-Object {($_.DeviceID -ne 'E:')}

Posted

Get-WMIObject win32_logicaldisk -ComputerName ServerName | Where-Object {($_.DeviceID -ne 'E:')}  | Format-Table

  • Upvote 1
Posted

work avthundhi bro thanx....actuall ga make 7 drives unai each disk lo but i can get the result  of c and d, annitiki where  -ne pettesthunna except c and d... once again thanx 

Posted

Get-WMIObject win32_logicaldisk -ComputerName ServerName | Where-Object {($_.DeviceID -in 'c:', 'd:')} | Format-Table

idhi try chey, annitiki -ne pette badulu 

Posted
4 hours ago, chitti_naidu said:

Get-WMIObject win32_logicaldisk -ComputerName ServerName | Where-Object {($_.DeviceID -in 'c:', 'd:')} | Format-Table

idhi try chey, annitiki -ne pette badulu 

 

Thanks a lot bro already work submit chesina..........eppudaina malli ilati situation vosthey sure ga idhi try chestha.......

Posted
4 hours ago, AmazingSpiderReddy said:

Use -and / -or operations on filter

Thanks bro

Posted
5 hours ago, vadukunnantha_vaduko said:

work avthundhi bro thanx....actuall ga make 7 drives unai each disk lo but i can get the result  of c and d, annitiki where  -ne pettesthunna except c and d... once again thanx 

chiiti naidu alias @Spartan keka

Posted

@chitti_naidu

china help bro 

nenu rasindhi idhi    Get-CimInstance win32_logicaldisk -ComputerName USLEDDFS01| Where-Object {($_.DeviceID -ne 'A:' -AND $_.DeviceID -ne 'C:') -AND $_.DeviceID -ne 'I:' -AND $_.DeviceID -ne 'J:'}

vadu dhiniki ila annadu bro 

Manager:-

please include the shares on the servers.
A quick fix might be to add `get-wmiobject -class win32_shares`

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...