?
Solved

Remove-WssComputer Powershell command in Windows 2012 with Server Essentials

Posted on 2016-11-01
4
Medium Priority
?
154 Views
Last Modified: 2016-11-21
There are a few computers in the WSE dashboard that I can't remove from the dashboard. I found a Microsoft article showing how to do this using Powershell (https://technet.microsoft.com/en-us/library/dn205092(v=wps.630).aspx). I must be missing something, because when I run the first of the two commands ($DeviceList = Get-WssComputer), I don't get any output I can use for the second command that removes the computer - I just get another command prompt. The second command that removes the computer is-

Remove-WssComputer -Computer $DeviceList[0] -RemoveBackup

Can someone clarify usage of these Powershell commands for me? I'm assuming that the [0] after $DeviceList in the second command is the info I need to enter, that comes from the output of the first command.
0
Comment
Question by:apmartin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
Raheman M. Abdul earned 2000 total points (awarded by participants)
ID: 41868824
$DeviceList = @(Get-WssComputer)
Remove-WssComputer -Computer $DeviceList[0] -RemoveBackup

the second line removes the first computer in the list you received and stored in $deviceList variable since you are using $DeviceList[0]
to remove the second device use $DeviceList[1]  
similarly  use $DeviceList[2] , $DeviceList[3] etc


alternatively run this  to show how many devices you found:
$DeviceList = Get-WssComputer
$DeviceList

to remove all devices found, use:
Get-WssComputer | Remove-WssComputer  -RemoveBackup
1
 

Author Comment

by:apmartin
ID: 41868841
Hi Raheman,

Thanks for the quick reply! One other question: when I run the $devicelist command, it spits out the list of computers and the properties for each computer. However, the computers do not show which number in the list they occupy. Is there a way to specify the name of the computer to remove, or have the $devicelist output show the number of each computer, which would be easier than counting through 50+ computers?
0
 
LVL 19

Assisted Solution

by:Raheman M. Abdul
Raheman M. Abdul earned 2000 total points (awarded by participants)
ID: 41869901
get-WssComputer takes no computername to specify the computer to get the deviceInfo for.

can you send the output of the following so we can filter based on that. I dont have access to servers now.

Get-WssComputer | export-csv c:\temp\deviceInfo.csv -nti
we can filter based on the computer name
0
 
LVL 19

Expert Comment

by:Raheman M. Abdul
ID: 41895641
No comments added and is the only acceptable and relevant answer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help you understand what HashTables are and how to use them in PowerShell.
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question