Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Remove-WssComputer Powershell command in Windows 2012 with Server Essentials

Posted on 2016-11-01
4
Medium Priority
?
189 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
A procedure for exporting installed hotfix details of remote computers using powershell
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

604 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