How to reboot a computer remotely

sometimes we need to reboot a computer remotely because we don’t have access to windows or because we are working from an admin computer, this command it’s helpful

Restart-Computer -ComputerName ServerName –Force

problems with VSS WRITERS for backups

Sometimes you are not able to backup the exchange databases because you get an error regarding to the writter, here you have the information how to fix it.

Open a command prompt as an admin

To see what writer is failing please type:
vssadmin list writers

Open a command prompt as an admin and write the follow line:
 NET STOP MSExchangeRepl

Once the service is stopped:
NET Start MSExchangeRepl

if its  Microsoft Exchange Writer:
net stop MSExchangeIS
net stop VSS
net stop MSExchangeRepl
net start MSExchangeIS
net start VSS
net start MSExchangeRepl

And voila, tray again with your backup script and should work.


SIP response code list in Skype for Business

SIP response code list 
When we are analyzing logs from Skype for business in Snooper, we can see too many codes 
and sometimes we are not sure what a code mean. 

Is for that I can give you a list of the codes with their description. 
For SIP 2.0 we have six different Status-codes (From 100 to 699) The most important is the 
first digit, not really matter the other two because they don’t have a categorization role, 
and therefore we are going to focus in the first digit and we can call “1xx response” 
for all status code between 100 and 199, the same for “2xx response” for all status code 
between 200 and 299, and so on…
This is the complete list of response codes:
 Provisional — request received, continuing to process the  request
 Success — the action was successfully received, understood and accepted;
 Redirection — further action needs to be taken in order to complete the request;
 Client Error — the request contains bad syntax or cannot be fulfilled at this server;
 Server Error — the server failed to fulfill an apparently valid request;
 Global Failure — the request cannot be fulfilled at any server.

Into the snooper there is an option to see the call flow as is shown in the follow figure:

<!--[if gte vml 1]><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
filled="f" stroked="f">

<v:shape id="Picture_x0020_2" o:spid="_x0000_i1026" type="#_x0000_t75"
<v:imagedata src="file:///C:\Users\GONZAN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"
With a result very similar to:

<!--[if gte vml 1]><v:shape id="Picture_x0020_1"
o:spid="_x0000_i1025" type="#_x0000_t75" style='width:417.6pt;height:639pt;
<v:imagedata src="file:///C:\Users\GONZAN~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png"
Where we can see the response codes and the first table can help you to understand 
what’s going on with your call.
With this information I hope you can find root causes of your Skype for business environment.

your comment/feedback is more than welcome.


Databases type in Skype for business

I’m writing a script for fail over a complete pool or only some databases and I notice that we only can fail over by Database type, hence I made a research to figure out which database belong to every type, this is part of the script and you can see the types in red color.

#function to fail-over all the pool
function Get-PoolFOtoMIRROR
    Invoke-CsDatabaseFailover -PoolFqdn ‘PoolFQDN’ -NewPrincipal Mirror -ExcludeDatabaseList “mgc”

#function to fail-over only a specific DB
function Get-DataBaseFOtoMIRROR
Write-Host “Please select the Database to fail-over…” -ForegroundColor Green
write-host “————————————–” -ForegroundColor Green

Write-Host “1. Application: rgsconfig, rgsdyn, cpsdyn.” -ForegroundColor Green
Write-Host “2. Archiving: lcslog.” -ForegroundColor Green
Write-Host “3. CentralMgmt: xds, lis” -ForegroundColor Green
Write-Host “4. Monitoring: lcscdr, qoemetrics” -ForegroundColor Green
Write-Host “5. User: rtcab, rtcxds, rtcshared” -ForegroundColor Green

write-host “————————————–” -ForegroundColor Green
$DBtoFO = Read-Host “DB number: “

    1 {Invoke-CsDatabaseFailover -PoolFqdn -DatabaseType Application}
    2 {Invoke-CsDatabaseFailover -PoolFqdn -DatabaseType Archiving}
    3 {Invoke-CsDatabaseFailover -PoolFqdn -DatabaseType  CentralMgmt}
    4 {Invoke-CsDatabaseFailover -PoolFqdn -DatabaseType  Monitoring}
    5 {Invoke-CsDatabaseFailover -PoolFqdn -DatabaseType  User}
    default{write-host “option invalid…..” -ForegroundColor Green}



Can’t send IM to chat groups "A server error occurred, please contact your administrator"

“A server error occurred, please contact your administrator” message error on Skype for business client.

If you are trying to send a message to a chat group and get this message error: “A server error occurred, please contact your administrator” maybe it’s a SQL problem, to confirm this you can run the follow command in a Skype for business Front End server:

PS C:\> Get-CsUserPoolInfo UserAffected

You can see to which server is connected


As well you can hold the Ctrl key and right click on the Skype for business icon in the task bar

And check “Skype for business server” field to get the server name.

Once you get the Skype for business server, Go to Event viewer and check the errors, you will find the error “LS User Store Sync Agent” with Event 57005

Error encountered pushing data to RtcXds Blob Store.

The transaction log for database ‘rtcxds’ is full due to ‘LOG_BACKUP’.

or Event 9002 “The transaction log for database ‘rtcxds’ is full due to ‘DATABASE_MIRRORING’.”

It means you need to back up the rtcxds database.

Go to your backend SQL server, right click on rtcxds database, all task. Backup.
In the Backup type choose Transaction Log.

Add a destination and click on OK button.

After back up the DB you will be able to send IM to the chat groups.
In addition you can run this line on SQL server query.


To get all DB’s information

how to put in maintenance mode a front server in Skype for business 2015

If you need to reboot a front server in Skype for business 2015 or for some reason shutdown, you must put in maintenance mode the front end server.

First, check that all services are running:

PS C:\> Get-CsWindowsService -ComputerName FQDNServer

The output should be something like this:
Status   Name            ActivityLevel
——   —-            ————-
Running  W3SVC
Running  REPLICA
Running  FabricHostSvc
Running  RTCSRV          Incoming Requests per Second=0,Messages in Server=9…
Running  RTCCAA          Concurrent Calls=0
Running  RTCCAS          Concurrent Conferences=0
Running  RTCRGS          Current Active Calls=0
Running  RTCPDPCORE      Active Client Connections=0,Active Edge Connections=3
Running  RTCCPS          Total Parked Calls=0
Running  RTCATS          Current Active Calls=0
Running  RTCIMMCU        Active Conferences=0,Connected Users=0
Running  RTCDATAMCU      Active Conferences=1
Running  RTCAVMCU        Number of Conferences=0,Number of Users=0
Running  RTCASMCU        Active Conferences=0,Connected Users=0
Running  RTCMEDSRV       Current Outbound Calls=0,Current Inbound Calls=0,Cu…
Running  RTCHA

You can continue using the follow command:

PS C:\> Stop-CsWindowsService -ComputerName abzpauf001x -Graceful

where the switch Graceful means the server will not accept more connections but will wait until the communication ends before stop the service.

This process can take several minutes or hours. The good news is that we have the follow command:

PS C:\> Invoke-CsComputerFailOver -ComputerName FQDNServer

Once the command has been executed, you can check again the services and all of them should be in stopped status. To do this run the Get-CsWindowsService again:

The FailOveris is for the same purpose but its faster just be sure after reboot the server execute the Invoke-CsComputerFailBack -ComputerName FQDNServer

Can’t open a powershell session in Skype for business 2015 or Lync 2013

If you are trying to use Skype for business powershell in your computer to manage your servers and get this error:

New-PSSession : [ServerFQDN] Connecting to remote server ServerFQDN failed with the following error message : The
SSL connection cannot be established. Verify that the service on the remote host is properly configured to listen for HTTPS requests. Consult the
logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service,
run the following command on the destination to analyze and configure the WinRM service: “winrm quickconfig -transport:https”. For more information,
see the about_Remote_Troubleshooting Help topic.
At line:1 char:12
+ $Session = New-PSSession -ConnectionUri https://ServerFQDN/ocsP
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : -2144108102,PSSessionOpenFailed
Import-PSSession : Cannot validate argument on parameter ‘Session’. The argument is null. Provide a valid value for the argument, and then try
running the command again.
At line:2 char:18
+ Import-PsSession $session
+                  ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Import-PSSession], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ImportPSSessionCommand

You need to uninstall the Windows Management Framework 5.0 because is not compatible with Lync or Skype for business. the version 5.1 is not compatible either.

How to get the full cmdlets list in Exchange 2016

to get the complete list of all cmdlets that you can run in exchange 2016, open an Exchange  powershell and try with the follow commands:

Full list of cmdlets: Get-Command
Only Exchange cmdlets: Get-ExCommand
Cmdlets that match a specific string: Help **
Get general help: Help
Get help for a cmdlet: Help or -?
Exchange team blog: Get-ExBlog
Show full output for a command: | Format-List

Show quick reference guide: QuickRef
With this command, a web page will be opened with the Exchange Management Shell quick reference for Exchange information where you can see how to use the cmdlets in powershell.