How to Translate GroupPolicy GUID to Name

A GPO GUID, or Global Unique Identifier, is a specific ID assigned to every Group Policy Object. You can see SYSVOL contents of every GPO by browsing to: \\myad.local\SYSVOL\myad.local\Policies\{1407C36F-B52B-4A8B-85DF-BDBC8E823085}


Open up Active Directory Users and Computers (ADUC) look in the System Container. Browse to Policies and you should see the GUID for every GPO in your domain. If you don’t see System, enable “Advanced Features” on “View” menu. Right click on any GUID and select properties; then select the Attribute Editor Tab. Look for the displayName attribute.

Use Powershell:

The CMDLET name is Get-GPO with the parameter -guid.

Get-GPO -GUID “{1407C36F-B52B-4A8B-85DF-BDBC8E823085}”

When you run that command, you will get the DisplayName, domain, owner, GUID, and GPO Status.

Posted in Computers and Internet | Tagged , | Leave a comment

How to Upgrade AD schema

Doing AD schema upgrade always create some worry but basically it is to add some attributes to AD db; Is not so common that something go wrong.

Here some suggestions how to do it.

First use a Machine on the same site of DC holding Schema Master:

nltest /dsgetsite

Check the server that hold the Schema Master Role:

dsquery server -forest -hasfsmo schema

Check the Replica:

repadmin /replsum /bysrc /bydest /sort:delta 

Now you can perform the schema upgrade.

After performing an Active Directory schema update, one should verify that all the DCs received the update:

repadmin /showattr * cn=Schema,cn=Configuration,dc=myad,dc=local /atts:ObjectVersion

This repadmin command connects to every DC and displays the AD schema version. The following information translates the AD schema object version code to the OS version.
• 13 = Windows 2000 Forest Functional Mode
• 30 = Windows 2003 Forest Functional Mode
• 31 = Windows 2003 R2 Forest Functional Mode
• 44 = Windows 2008 Forest Functional Mode
• 47 = Windows 2008 R2 Forest Functional Mode

Repadmin can also be used to confirm a successful Exchange Schema update. The command for this is:

repadmin /showattr * cn=ms-exch-schema-version-pt,cn=Schema,cn=Configuration,dc=myad,dc=local /atts:rangeupper

Repadmin can also be used to confirm a successful Lync Schema update. The command for this is:

repadmin /showattr * cn=ms-RTC-SIP-SchemaVersion,cn=Schema,cn=Configuration,dc=myad,dc=local /atts:rangeupper
Posted in Computers and Internet | Tagged | Leave a comment

How to inventory DCs Network Configuration via Powershell

I created a powershell script to generate a Report as HTML page (to publish it on sharepoint) with the IP and DNS configuration for all the forest DCs.

$MyForest = "rootdomain.local"
$AllServers=(Get-ADForest $MyForest).Domains | %{Get-ADDomainController-Filter *-Server $_}
$RunDate = Get-DateForEach ($Server in $AllServers){ 
    $Result=Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "IPEnabled = 'True'"-Property @("IPADDRESS","DNSServerSearchOrder")-ComputerName $Server.Name -ErrorActionSilentlyContinue 

    $output += new-objectPSObject-Property $props
$b = $output | Select-Object ComputerName, @{Name="IP";Expression={$ip="";Foreach($ipDN in $_.IPAddress){$ip += "$ipDN; "};$ip}}, @{Name="DNSClientSetting";Expression={$dns="";Foreach($dnsDN in $_.DNSServerSearchOrder){$dns += "$dnsDN; "};$dns}}
$outfile = $b |ConvertTo-HTML-head $a-body "</pre>
<h2>DCs DNSClient Settings - Inventory</h2>
This page was generated by a Script at $RunDate
<pre>" -PreContent " " -PostContent " "

$outfile | Out-File C:\Data\Working\Production_Environment_DCsDNSClientSetting.html

Remember to change the $MyForest variable with the domain name of your AD forest and the output path on the last script line.

If you want to publish it to Sharepoint, here the code:

function Publish-File {
	param (
		[parameter( Mandatory = $true, HelpMessage="URL pointing to a SharePoint document library (omit the '/forms/default.aspx' portion)." )]
		[parameter( Mandatory = $true, ValueFromPipeline = $true, HelpMessage="One or more files to publish. Use 'dir' to produce correct object type." )]
	$wc = new-object System.Net.WebClient
	if ( $Credential ) { $wc.Credentials = $Credential }
	else { $wc.UseDefaultCredentials = $true }
	$FileName | ForEach-Object {
		$DestUrl = "{0}{1}{2}" -f $Url.ToString().TrimEnd("/"), "/", $_.Name
		Write-Verbose "$( get-date -f s ): Uploading file: $_"
		$wc.UploadFile( $DestUrl , "PUT", $_.FullName )
		Write-Verbose "$( get-date -f s ): Upload completed"

Dir C:\Data\Working\Production_Environment_DCsDNSClientSetting.html | Publish-File -Url "https://teams01.mysharepoint.local/000001/Wiki/Pages/"
Posted in Computers and Internet | Tagged , | Leave a comment

How to disable IPv6 transition protocol on Windows

IPv6 on Windows is enabled by default and is really suggested to do not disable it if you don’t have a good reason. Disabling completely IPv6 can introduce some boot delay around 5 second; but if you still want to do that:

If you simply do not manage/route the IPv6 traffic on your network, or better you are running on an IPv6 only network, can be useful to disable the unused IPv6 transition protocols.

On Windows 8 clients using PowerShell, open an elevated PowerShell prompt and execute the following commands:

Set-Net6to4Configuration –State disabled
Set-NetTeredoConfiguration –Type disabled
Set-NetIsatapConfiguration –State disabled

On Windows 7 client using netsh, open an elevated command prompt and execute the following commands:

netsh interface 6to4 set state disabled
netsh interface teredo set state disabled
netsh interface isatap set state disabled

To learn more about IPv6 check this blog:

Posted in Computers and Internet | Tagged , , | Leave a comment

How to Mount a SAMBA share at login on GNOME3 with Nautilus/GVFS

If you need to have a samba share mounted at login, example for backup purpose, just run this command:

echo gvfs-mount "smb://" | tee -a /home/myuser/.profile

This command adds gvfs-mount to .profile on your home

Remember to change the command with your samba share and your home path.

Posted in Computers and Internet | Tagged , , | Leave a comment

How to install Deja-Dup integration with Nautilus

If you are missing “Restore Missing Files…” or “Revert to Previous Version…” context menu on Nautilus, install this package:

dnf install deja-dup-nautilus
Posted in Computers and Internet | Tagged , | Leave a comment

ERROR: Gimp is not able to open a PSD file in CMYK mode

When I try, gimp gives me the error:
Error loading PSD file: Unsupported color mode: CMYK

Opening this file is only possible with a conversion to rgb.
Use ImageMagick with the -colorspace switch ie.

convert myfile.psd -colorspace rgb myfile.xcf

ImageMagick is available also for windows and in portable release

Posted in Computers and Internet | Tagged | Leave a comment