Solved

Remove-WssComputer Powershell command in Windows 2012 with Server Essentials

Posted on 2016-11-01
4
13 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)
Comment Utility
$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
Comment Utility
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)
Comment Utility
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
Comment Utility
No comments added and is the only acceptable and relevant answer
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
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 …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now