Windows Touch command
Windows (Touch) Wednesday, 16 March 2022 by paul

Windows does not have a touch command built in but you can run the following copy command to update the timestamps on all the files in a folder.

forfiles /p "." /c "cmd /c copy /b @path+,,"


List Azure AD Enterprise Apps with expired SSL Certificates
Microsoft (Azure) Wednesday, 02 March 2022 by paul

Azure AD Enterprise Apps may be using a custom SSL certificate for Azure App Proxy. The following PowerShell script checks to see if any of the SSL certificate have expired.

# List Azure AD Enterprise Apps with expired SSL certificates

Import-Module AzureAD

try { 
    $var = Get-AzureADTenantDetail 
   catch [Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthenticationException] { 

$aadapServPrinc = Get-AzureADServicePrincipal -Top 100000 | where-object {$_.Tags -Contains "WindowsAzureActiveDirectoryOnPremApp"}  

Write-Host "Reading Azure AD applications..."
$allApps = Get-AzureADApplication -Top 100000 

Write-Host "Reading applications..."
$aadapApp = $aadapServPrinc | ForEach-Object { $allApps -match $_.AppId} 
$count = $aadapApp.count
Write-Host ("$count apps found")

$expired = 0
foreach ($item in $aadapApp) {
    $appname = $item.DisplayName	
    $tempApps = Get-AzureADApplicationProxyApplication -ObjectId $item.ObjectId
    $url = $tempApps.ExternalUrl
	$cert = $tempApps.VerifiedCustomDomainCertificatesMetadata
    $ssl = $cert.SubjectName
	if($cert -ne $null){
       $issuedate = $cert.IssueDate
       $expirydate = $cert.ExpiryDate
	   $ed=[Datetime] $expirydate
       Write-Host ("")
       Write-Host ("App: $appname")
       Write-Host ("External Url: $url")
       Write-Host ("SSL Name: $ssl")
       Write-Host ("Issue Date: $issuedate")
	   if($ed -lt (Get-Date)) {
          Write-Host ("Expiry Date: $expirydate (EXPIRED)") -ForegroundColor "Red"
		  $expired = $expired + 1
	   else {
          Write-Host ("Expiry Date: $expirydate") -ForegroundColor "Green"
    #Write-Host ("$tempapps") -ForegroundColor "Gray"
Write-Host ("")
Write-Host ("Finished. $expired expired.")
Write-Host ("")

Then SSL certificates can be replaced if expired.

Allow Edge to open Citrix Workspace links without prompting
Microsoft (Edge) Monday, 28 February 2022 by paul

When opening a link to a Citrix site the Edge browser prompts the user before opening the Citrix Workspace app.

The prompt can be disabled by configuring the group policy below:

User Configuration -> Policies -> Administrative Templates -> Microsoft Edge -> Define a list of protocols that can launch an external application from listed origins without prompting the user.

Add the following string for the policy above:

[ { "allowed_origins": [ "https://siteurl" ], "protocol": "receiver" } ]

Then Edge will not prompt when accessing that site before opening Citrix Workspace.

Error running SQL Server Configuration Manager
Microsoft (SQL Server) Friday, 18 February 2022 by paul

When trying to run SQL Configuration Manager it displays the error message “Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 or later server with SQL Server Configuration Manager. Invalid namespace (0x8004100e)”

To fix:

  1. Open command prompt as admin
  2. Go to folder “c:\program files (x86)\microsoft sql server\x\shared” (where x is the version of SQL Server you are using)
  3. Run command “mofcomp "sqlmgmproviderxpsp2up.mof”. Result should be like below:
Microsoft (R) MOF Compiler Version 10.0.17763.1
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: sqlmgmproviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository...

Now it Configuration Manager should start.

OpenSSL error 0906D06C
OpenSSL (error) Monday, 14 February 2022 by paul

When using the Windows version of OpenSSL to carry out operations on certificate it displays the following error message:

unable to load private key

error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY

unable to write 'random state'

This was due to the key file encoding (UTF-8-BOM).

To fix load the file into notepad++ and change the encoding from UTF-8-BOM to UTF-8. Then it should process the files fine.

Page 1 of 92 (462 Articles) << 1 2 3 4 5  Next >>