Solved

Remove-WssComputer Powershell command in Windows 2012 with Server Essentials

Posted on 2016-11-01
4
48 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
  • 3
4 Comments
 
LVL 18

Accepted Solution

by:
Raheman M. Abdul earned 500 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 18

Assisted Solution

by:Raheman M. Abdul
Raheman M. Abdul earned 500 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 18

Expert Comment

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

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell Script Request / Suggestion 6 49
Powershell Interpretation Request 2 11
text file manipulation 2 18
Office 365: Content Search, Search and Purge 17 10
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
A procedure for exporting installed hotfix details of remote computers using powershell
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 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