23-03-2014 12-09-39

Microsoft Project – deliverable – fichiers srchui.dll and jscript.dll

0

From Microsoft Project 2010 and 2013, using the deliverable you get this error message:

23-03-2014 11-49-30

This message look like coming from graveyard of Project 2003.

Useless to search your hard drive for these files, you don’t have them.

The real problem is security of the “Internet” zone in Internet Explorer, even if your server is in the “intranet” one.

Internet zone must not be in the highest position, or deliverables won’t work.

26-03-2014 07-43-13

Even happening with Windows Server 2012 R2 + Project 2013 SP1 + IE 11 full updated…

 

 

29-03-2014 12-55-19

SharePoint/Project 2013 SP1 – Configuration wizard

0

After deploying Service pack 1 for SharePoint/Project 2013, you have to go through the configuration wizard. In this case, it was failing on all nodes with this error in log:

SyncUpgradeTimerJob: sleeping for 10 seconds
SyncUpgradeTimerJob: sleeping for 10 seconds
SyncUpgradeTimerJob: Upgrade timer job failed. Return -1.
The exclusive inplace upgrader timer job failed.

 

Step 1 – other log

Another log is much more useful, in same location, named like upgrade-date-blahblah-error.log:

Exception: The operation cannot be performed on database "WSS_UsageApplication" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.  ALTER DATABASE statement failed

Or by using upgrade-spfarm command:

29-03-2014 12-55-19

 

Answer

Remove SQL Mirrpor or Always-on during upgrade on this database.

 

 

rdp2012_session_profile_disk_800391163

RDP 2012(R2) – session collection – profile disk – 800391163

0

While creating a session collection on Windows 2012/2012R2, and specifying a share to host profile disks, you get error 800391163:

rdp2012_session_profile_disk_800391163

While applying, one of the RDP will create VHD template on the share using Local System:

rdp2012_session_profile_disk_procmon

In details:

rdp2012_session_profile_disk_procmon2

Even if the computers objects have full control on NTFS, it still fails.

You have to give “full control” to “everyone” on the share, “change” is not enough:

rdp2012_session_profile_disk_share

Another closed case ^^

event_5586

SharePoint – User profile – ResetSynchronizationDatabase : Operation is not valid due to the current state of the object

0

Issue

Trying to reset the SharePoint UPS sync database, I had the following error message:

PS C:\> $upa.ResetSynchronizationDatabase()
 Exception calling "ResetSynchronizationDatabase" with "0" argument(s):
 "Operation is not valid due to the current state of the object."
 At line:1 char:1
 + $upa.ResetSynchronizationDatabase()
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
 + FullyQualifiedErrorId : InvalidOperationException

Resolution

Database was in mirror, and i had the following event on the SharePoint box:

event_5586

You need to first remove mirroring session and try again.

 

 

sql_server_setup_failed_setup_account_privileges

SQL Server 2012 : Setup account privileges failed – HasSecurityBackupAndDebugPrivilegesCheck

0

Trying to deploy SQL Server 2012, I had the following error:

sql_server_setup_failed_setup_account_privileges

 

Clicking on Failed:

sql_server_setup_failed_HasSecurityBackupAndDebugPrivilegesCheck

 

Resolution

A GPO changed members of this privilege, and wasn’t incluing mine. I added the install account to this privilege to fix it.

gpo

Microsoft expert, bleak future ?

0

Sorry, this entry is only available in Français.

Nagios: monitor Hyper-V 2012 health – BPA & VM

0

This Nagios plugin check Hyper-V 2012 server health through PowerShell + NRPE (nsclient++):

  • Execute and retrieve BPA scan result (Best Practice Analyzer)
  • Check that all VM are running
  • Check that no VM are in any state other than “Operating normally”

Warning and Critical state are triggered by the sum of:

  • BPA alerts
  • # VM in unhealthy state

VM (models…) can be excluded through an argument

A new BPA scan is triggered at every execution, but new result is retrieved next time (async) (take too much time).

Provided performance data:

  • # VM stopped,
  • # VM unhealthy,
  • # BPA errors
  • # BPA warning

Tested setup

Linux:

  • Centos 6.4 x64
  • Nagios 3.4.4
  • check_nrpe 2.13
  • Centreon 2.4.2

Windows:

  • Windows Server 2012 (needed to have PowerShell Hyper-V module)
  • nsclient++ 0.4.1 x64

Script argument

  • excludeVM (comma separated)
  • maxWarn (Warning if aboce) (1 by default)
  • maxError (Criticial if above) (5 by default)

maxWarn and maxCrit must be integer

Usages samples

Directly in PowerShell:

PS C:\Program Files\NSClient++\scripts>. .\lotp_check_hyper-v.ps1
WARNING: 'VM Not Running:'2 'VM issues:'0 BPA Error:1 BPA Warning:12|VM_Not_Running=2 VM_issues=0 BPA_Error=1 BPA_Warning=12
PS C:\Program Files\NSClient++\scripts>

Through NRPE:

[root~]# /usr/lib64/nagios/plugins/check_nrpe -H myMonitoredServer -n -c check_hyper-v
WARNING: 'VM Not Running:'2 'VM issues:'0 BPA Error:1 BPA Warning:12|VM_Not_Running=2 VM_issues=0 BPA_Error=1 BPA_Warning=12
[root~]#

Install:

On Windows:

  • Enable powershell script execution without signed : Set-ExecutionPolicy RemoteSigned
  • copy script in folder C:\Program Files\NSClient++\scripts
  • Add to nsclient.ini:
    • [/settings/external scripts/wrapped scripts]
    • check_hyper-v=lotp_check_hyper-v.ps1 -excludeVM $ARG1$ -maxWarn $ARG2$ -maxError $ARG3$

Setup:

On Centreon, by adding this command:

$USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 60 -c check_hyper-v -a $ARG1$ $ARG2$ $ARG3$

Download

lotp_check_hyper-v.ps1

Source code:

/wp-content/uploads/2013/05/lotp_check_hyper-v.ps1_.txt
# ====================================================================
# Ping a list of targets through NRPE
# Author: Mathieu Chateau - LOTP
# mail: mathieu.chateau@lotp.fr
# version 0.1
# ====================================================================
 
#
# Require Set-ExecutionPolicy RemoteSigned.. or sign this script with your PKI 
#
 
# ============================================================
#
#  Do not change anything behind that line!
#
param 
(
	[string]$targets,
	[int]$maxWarn = 1,
	[int]$maxError = 5
)
 
$output=""
$exitcode=2
$countOK=0
$countKO=0
$targetsArray=@()
$targetsArray=$targets -split(' ')
Remove-Job -Name * -Confirm:$false -Force
foreach($t in $targetsArray)
{
	Start-Job -Name $t -ArgumentList $t -ScriptBlock {param($t);if(Test-Connection -ComputerName $t  -Count 2 -Quiet -ErrorAction SilentlyContinue){return $true}else{return $false}} |Out-Null
}
while(Get-Job -State Running)
{
	Start-Sleep -Milliseconds 500
}
foreach ($job in Get-Job)
{
	$temp=Receive-Job -Name $job.Name
	if($temp)
	{
		$countOK++
	}
	else
	{
		$countKO++
		$output+=$job.Name+" - "
	}
}
if ($countKO -gt $maxError)
{
	$state="CRITICAL"
	$exitcode=2
}
elseif ($countKO -gt $maxWarn)
{
	$state="WARNING"
	$exitcode=1
}
else
{
	$state="OK"
	$exitcode=0
}
 
$output=$state+":"+$countOK+" online"+" - "+$countKO+" offline - "+$output
$output+='|'
$output+="online="+$countOK+";"+$maxWarn+";"+$maxError+";"+" "
$output+="offline="+$countKO+";"+$maxWarn+";"+$maxError+";"
Write-Host $output
exit $exitcode

dcdiag – VerifyEnterpriseReferences – msDFSR-ComputerReferenceBL – Q312862

0

While writing a Nagios plugin on Active Directory health, dcdiag /e /c got the good idea to give this alert:

Starting test: VerifyEnterpriseReferences

The following problems were found while verifying various important DN

references. Note, that these problems can be reported because of

latency in replication. So follow up to resolve the following

problems, only if the same problem is reported on all DCs for a given

domain or if the problem persists after replication has had

reasonable time to replicate changes. 

 [1] Problem: Missing Expected Value

Base Object: CN=myDC,OU=Domain Controllers,DC=mydomain,DC=net

Base Object Description: "DC Account Object"

Value Object Attribute Name: msDFSR-ComputerReferenceBL

Value Object Description: "SYSVOL FRS Member Object"

Recommended Action: See Knowledge Base Article: Q312862

 

Article Q312862 is not really helpful, but the underlying problem is true.

Since Windows 2008, AD replication is meant through DFS-R and not FRS anymore. But it implies to have only DC > Windows Server 2003.

So if your DC are updated enough, you can use dfsrmig to migrate, which main commands are:

Check global state:

PS C:\users\mchateau\Desktop> dfsrmig /GetGlobalState

Current DFSR global state: 'Start'

Succeeded.

Values can be:

0 'Start'
1 'Prepared'
2 'Redirected'
3 'Eliminated'

==>if you are already in DFS-R, state is Eliminated.

Check migration state:

PS C:\users\mchateau\Desktop> dfsrmig /GetMigrationState

All domain controllers have migrated successfully to the Global state ('Start').
Migration has reached a consistent state on all domain controllers.
Succeeded.

 

Go from start to Prepared:

PS C:\users\mchateau\Desktop> dfsrmig /SetGlobalState 1

Current DFSR global state: 'Start'

New DFSR global state: 'Prepared'

Migration will proceed to 'Prepared' state. DFSR service will copy the contents of SYSVOL to SYSVOL_DFSR folder.
If any domain controller is unable to start migration, try manual polling.
Or run with option /CreateGlobalObjects.
Migration can start anytime between 15 minutes to 1 hour.
Succeeded.

 

Check state (in progress):

PS C:\users\mchateau\Desktop> dfsrmig /GetMigrationState

The following domain controllers have not reached Global state ('Prepared'):

Domain Controller (Local Migration State) - DC Type
===================================================

myDC01 ('Start') - Writable DC
myDC02 ('Start') - Writable DC
myDC03 ('Start') - Primary DC
myDC04 ('Start') - Writable DC

Migration has not yet reached a consistent state on all domain controllers.
State information might be stale due to Active Directory Domain Services latency.
PS C:\users\mchateau\Desktop>

 

You just have to go through the last two steps, turn by turn:

dfsrmig /SetGlobalState 2
dfsrmig /SetGlobalState 3

 

In the end:

PS C:\users\mchateau\Desktop> dfsrmig /GetMigrationState
All domain controllers have migrated successfully to the Global state ('Eliminated').
Migration has reached a consistent state on all domain controllers.
Succeeded.

Nagios: multithreaded multi ping through nrpe

0

Multithreaded multiple ping targets from a remote server through nrpe / nsclient.

For example, if you have a remote site with one server, you can then use it to ping different targets (local switch, google…).

Return number of online/offline targets.

the multithreaded allow a quick execution even with high number of targets, even if they are offline.

typical execution time: 1.75 seconds per target, in average

Provide performance data to get the ratio offline/online.

Can specify number of target that must be offline before triggering warning and critical state.

Tested setup

Linux:

  • Centos 6.4 x64
  • Nagios 3.4.4
  • check_nrpe 2.13
  • Centreon 2.4.2

Windows:

  • Windows Server 2008 R2 / 2012
  • nsclient++ 0.4.1 x64 et x86
  • Servers Core & GUI

Script arguments

  • targets (separated by commas, MANDATORY)
  • maxWarn (Warning if offline number above) (1 par défaut)
  • maxError (Critical if offline number above) (5 par défaut)

maxWarn et maxCrit must be integer

Sample usages

Directly in PowerShell:

PS C:\Program Files\NSClient++\scripts>. .\lotp_check_multiping.ps1 www.google.com,www.lotp.fr 1 2 
OK:2 online - 0 offline - |online=2;1;2; offline=0;1;2;
PS C:\Program Files\NSClient++\scripts>

Through NRPE:

[root~]# /usr/lib64/nagios/plugins/check_nrpe -H myMonitoredServer -n -c check_multiping -a www.google.com,www.lotp.fr 1 2
OK:2 online - 0 offline - |'online'=2;1;2 'offline'=0;1;2
[root~]#

Install:

On Windows:

  • Enable powershell script execution without signed : Set-ExecutionPolicy RemoteSigned
  • copy script in folder C:\Program Files\NSClient++\scripts
  • Add to nsclient.ini:
    • [/settings/external scripts/wrapped scripts]
    • check_multiping=lotp_check_multiping.ps1 -targets $ARG1$ -maxWarn $ARG2$ -maxError $ARG3$

Setup:

On Centreon, by adding this command:

$USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 60 -c  check_multiping -a $ARG1$ $ARG2$ $ARG3$

Download

lotp_check_multiping.ps1

(remove .txt at the end)

Source code :

/wp-content/uploads/2013/05/lotp_check_multiping.ps1_.txt
# ====================================================================
# Ping a list of targets through NRPE
# Author: Mathieu Chateau - LOTP
# mail: mathieu.chateau@lotp.fr
# version 0.1
# ====================================================================
 
#
# Require Set-ExecutionPolicy RemoteSigned.. or sign this script with your PKI 
#
 
# ============================================================
#
#  Do not change anything behind that line!
#
param 
(
	[string]$targets,
	[int]$maxWarn = 1,
	[int]$maxError = 5
)
 
$output=""
$exitcode=2
$countOK=0
$countKO=0
$targetsArray=@()
$targetsArray=$targets -split(' ')
Remove-Job -Name * -Confirm:$false -Force
foreach($t in $targetsArray)
{
	Start-Job -Name $t -ArgumentList $t -ScriptBlock {param($t);if(Test-Connection -ComputerName $t  -Count 2 -Quiet -ErrorAction SilentlyContinue){return $true}else{return $false}} |Out-Null
}
while(Get-Job -State Running)
{
	Start-Sleep -Milliseconds 500
}
foreach ($job in Get-Job)
{
	$temp=Receive-Job -Name $job.Name
	if($temp)
	{
		$countOK++
	}
	else
	{
		$countKO++
		$output+=$job.Name+" - "
	}
}
if ($countKO -gt $maxError)
{
	$state="CRITICAL"
	$exitcode=2
}
elseif ($countKO -gt $maxWarn)
{
	$state="WARNING"
	$exitcode=1
}
else
{
	$state="OK"
	$exitcode=0
}
 
$output=$state+":"+$countOK+" online"+" - "+$countKO+" offline - "+$output
$output+='|'
$output+="online="+$countOK+";"+$maxWarn+";"+$maxError+";"+" "
$output+="offline="+$countKO+";"+$maxWarn+";"+$maxError+";"
Write-Host $output
exit $exitcode
06-05-2013 22-52-21

SharePoint: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

0

Top issues:

  • Powershell prompt not started with run as administrator (UAC)
  • You are not a local admin at all,
  • You don’t have access to database in SQL. Snapin must connect to SQL database.

For the UAC stuff, you can use Process Explorer to be sure you are really an admin (UAC elevated):

  • Deny : You are memver but UAC is blocking you (filtered). Restart with run as administrator
  • Owner: You are really admin with UAC elevated. Check SQL rights ;)

06-05-2013 22-52-21

06-05-2013 22-53-32

 

Go to Top