Solved

remote cloud server 2008 remove a role ?

Posted on 2013-06-07
2
281 Views
Last Modified: 2013-07-05
HI All ,

have a remote cloud server 2008 r2 , to witch user has added a role web rdp , but there are no TS license on the server so all RDP is lost , - still have access via vpn , is there any way to turn off the role . can't use server manager from another 2008 - will not connect WinRD client can not process request.

can access reg on remote server .

ideas ?
0
Comment
Question by:awall2012
[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
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39251143
since u have powershell installed in both servers u can run Remove-WindowsFeature remotely on your cloud server 2008 r2.
save the script as *.ps1 file, change the $remote_pc variable to your target machine name and run it from your command window.

Function Remove-OSFeature
{
 Param(
  [Parameter(Mandatory=$true)]
  $computername,
  [Parameter(Mandatory=$true)]
  $featurename
 )
 $cmdBlock = "Import-Module ServerManager `
`$featureInstall = Remove-WindowsFeature -Name $featureName -LogPath `"`$(`$env:temp)\$($featureName).log`"
if (`$featureInstall.Success) {
	Write-Host `"$featureName removed successfully`"
	if (`$featureInstall.RestartNeeded -eq `"Yes`") {
		Write-Host `"This feature removal requires restart. Pls restart $computerName`"
	}
} else {
	Write-Error `"`$featureName could not be installed`"
	Get-Content `"`$(`$env:temp)\$($featureName).log`" | Out-Host
}"
Write-Verbose $cmdBlock
$scriptBlock = $ExecutionContext.InvokeCommand.NewScriptBlock($cmdBlock)
 Write-Verbose "Verifying if $computername has remoting enabled"
 if (Test-PSRemoting -ComputerName $computername) {
  try {
   Write-Verbose "Removing OS Feature: $featureName"
   Invoke-Command -ComputerName $computername -ScriptBlock $scriptBlock
  }
  catch {
   Write-Verbose $_
   return $false
  }
 } else {
  Write-Error "PowerShell remoting must be enabled to run this command"
  Return $false
 }
}      
$remote_pc = 'cloud server 2008 r2'
Remove-OSFeature -ComputerName $remote_pc -FeatureName RDS-Web-Access

Open in new window


i basically followed Ravikanth post here: http://www.ravichaganti.com/blog/?p=1878
0
 

Author Closing Comment

by:awall2012
ID: 39303560
thank you
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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