AD Change Display name

At the company were I worked we had a name change. They also use the display name in outlook to send mail. Example: Daag van der Meer [Company] So everyone see direct what the company is.

The script below built the display name with firstname lastname [Company]

# Script created by Daag van der Meer
# Blog.van-daag.nl

Import-Module ActiveDirectory

#creates a list of all users (change all between <>
$allUsers = Get-ADUser -Filter * -SearchBase 'ou=Users,ou=<OU>,DC=<DC>,DC=<DC' -Properties cn,displayName

 
# Add your company name or something else after username 
$hi = "<company>"

 

foreach ( $u in $allUsers | Where-Object { ($_.givenName) -and ($_.surName) } ) {

    $fn = $u.givenName.Trim()

    $ln = $u.surName.Trim()

   

    Write-Host $fn $ln

    Set-ADUser -Identity $u -DisplayName "$fn $ln $hi" -GivenName "$fn" -SurName "$ln"-PassThru |

        Rename-ADObject -NewName "$fn $ln $hi"

}

 

Enable Windows Photo Viewer in Windows 10

In windows 10 Windows Photo Viewer is gone.
Here is how to activate it.
Download the following regkeys.
Activate-Windows-Photo-Viewer-on-Windows-10

When runned. Right click on a picture. Goto open with, Choose another app.

Now you get a list, Select Windows Photo Viewer and check Always use this app to open .* files.

Source: howtogeek.com

Here is the XML for GPO import Registry. Save as XML and drag and drop it in Computer Configuration > Preferences > Windows Settings > Registry

<Collection clsid="{53B533F5-224C-47e3-B01B-CA3B3F3FF4BF}" name="Windows Photo Viewer" changed="2016-09-20 14:00:00" uid="{26D98409-EB77-4970-B752-C90AD76A92FE}" bypassErrors="1">
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="MuiVerb" status="MuiVerb" image="7" changed="2020-03-20 12:54:01" uid="{818C8763-9895-4F80-B735-60F27C4386BB}">
		<Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="Applications\photoviewer.dll\shell\open" name="MuiVerb" type="REG_SZ" value="@photoviewer.dll,-3043"/>
	</Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:54:07" uid="{36B81D47-DC5E-449D-9723-A561E07949E4}">
		<Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="Applications\photoviewer.dll\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/>
	</Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:54:14" uid="{8BAF044A-5CF7-4CCD-BAC3-933887108900}">
		<Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="Applications\photoviewer.dll\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/>
	</Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:54:21" uid="{59D93675-BF4C-4FC3-80EF-46BE54D187D2}">
		<Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="Applications\photoviewer.dll\shell\print\command" name="" type="REG_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/>
	</Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:54:29" uid="{1C3BE016-D09D-4098-B16B-0F5D5E51B3E7}" bypassErrors="1">
		<Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="Applications\photoviewer.dll\shell\print\DropTarget" name="Clsid" type="REG_SZ" value="{60fd46de-f830-4894-a628-6fa81bc0190d}"/>
	</Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ImageOptionFlags" status="ImageOptionFlags" image="12" changed="2020-03-20 12:19:23" uid="{0B0E13E5-06CE-4A7C-A6AA-0EA1CE3D191D}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Bitmap" name="ImageOptionFlags" type="REG_DWORD" value="00000001"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="FriendlyTypeName" status="FriendlyTypeName" image="7" changed="2020-03-20 12:15:22" uid="{4BCEE34B-B09E-4116-A9A0-61613EBCDD80}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Bitmap" name="FriendlyTypeName" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll,-3056"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="DefaultIcon" status="(Default)" image="7" changed="2020-03-20 12:17:22" uid="{1BAA4738-5084-4302-AAC5-ED99DF4B71DC}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Bitmap\DefaultIcon" name="" type="REG_SZ" value="%SystemRoot%\System32\imageres.dll,-70"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:17:16" uid="{DE804BCD-86BE-4874-A373-A548C47F2D9A}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Bitmap\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:18:21" uid="{5354AA59-F6C7-44C9-8E05-BCEC2DEF680B}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Bitmap\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="EditFlags" status="EditFlags" image="12" changed="2020-03-20 12:19:16" uid="{FD1440E7-AAFB-40DA-8762-6F964927E1B2}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF" name="EditFlags" type="REG_DWORD" value="00010000"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ImageOptionFlags" status="ImageOptionFlags" image="12" changed="2020-03-20 12:20:06" uid="{60940264-3F52-4F23-BC7D-C751D3E9469F}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF" name="ImageOptionFlags" type="REG_DWORD" value="00000001"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="FriendlyTypeName" status="FriendlyTypeName" image="7" changed="2020-03-20 12:22:31" uid="{AC3FCD87-45F1-42EA-A514-9E893190BC57}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF" name="FriendlyTypeName" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll,-3055"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="DefaultIcon" status="(Default)" image="7" changed="2020-03-20 12:23:38" uid="{8ADEB44E-D03A-40DD-9D14-13D55A87E8AD}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF\DefaultIcon" name="" type="REG_SZ" value="%SystemRoot%\System32\imageres.dll,-72"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="MuiVerb" status="MuiVerb" image="7" changed="2020-03-20 12:24:27" uid="{FADE9D5A-46D1-4248-B4E1-056656732D6E}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF\shell\open" name="MuiVerb" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\photoviewer.dll,-3043"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:25:20" uid="{FDB758AC-5178-4576-88E4-BEB4E9907B83}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:25:58" uid="{DF76ED93-D126-492D-A855-C63CD9D979A9}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.JFIF\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="EditFlags" status="EditFlags" image="12" changed="2020-03-20 12:26:42" uid="{3557C4B9-01EC-4DF7-98A8-5B9CA421F7EF}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg" name="EditFlags" type="REG_DWORD" value="00010000"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ImageOptionFlags" status="ImageOptionFlags" image="12" changed="2020-03-20 12:27:07" uid="{B2181548-7565-4AC0-A466-E657C274AF3A}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg" name="ImageOptionFlags" type="REG_DWORD" value="00000001"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="FriendlyTypeName" status="FriendlyTypeName" image="7" changed="2020-03-20 12:27:44" uid="{76EB2C26-3E65-4ABD-9A40-3E34C5A1B5A6}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg" name="FriendlyTypeName" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll,-3055"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="DefaultIcon" status="(Default)" image="7" changed="2020-03-20 12:28:43" uid="{7D74558A-ACAE-4E43-AF78-A67864384762}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg\DefaultIcon" name="" type="REG_SZ" value="%SystemRoot%\System32\imageres.dll,-72"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="MuiVerb" status="MuiVerb" image="7" changed="2020-03-20 12:29:24" uid="{C743374F-B65C-4AA4-A7EB-E066B9AD91C0}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg\shell\open" name="MuiVerb" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\photoviewer.dll,-3043"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:30:16" uid="{BDB3DBC8-A056-480B-8334-0C322BA6AB03}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:30:53" uid="{4DEF65EC-E6BB-4FB0-AE02-187678BBD7C7}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Jpeg\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ImageOptionFlags" status="ImageOptionFlags" image="12" changed="2020-03-20 12:31:37" uid="{A4C76D3A-741D-4E0E-AFD2-5F25F938BDFB}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Gif" name="ImageOptionFlags" type="REG_DWORD" value="00000001"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="FriendlyTypeName" status="FriendlyTypeName" image="7" changed="2020-03-20 12:32:08" uid="{177AF4D6-CD2E-42C9-98C6-DA4973C2A765}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Gif" name="FriendlyTypeName" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll,-3057"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="DefaultIcon" status="(Default)" image="7" changed="2020-03-20 12:33:00" uid="{0784BD34-64B6-4058-995B-1023865586A9}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Gif\DefaultIcon" name="" type="REG_SZ" value="%SystemRoot%\System32\imageres.dll,-83"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:33:36" uid="{10C4DFA6-08E0-4898-9777-50E00E8505DD}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Gif\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:34:40" uid="{B3FE350F-2A1A-4845-8F63-C7440AAE79D2}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Gif\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ImageOptionFlags" status="ImageOptionFlags" image="12" changed="2020-03-20 12:38:02" uid="{D2B47B31-919D-4F3C-9CAD-6CB3E089ADD4}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Png" name="ImageOptionFlags" type="REG_DWORD" value="00000001"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="FriendlyTypeName" status="FriendlyTypeName" image="7" changed="2020-03-20 12:39:19" uid="{0C83CF63-7F85-4DCC-8400-4C9CB8F9DF5B}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Png" name="FriendlyTypeName" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll,-3057"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="DefaultIcon" status="(Default)" image="7" changed="2020-03-20 12:40:04" uid="{7582A529-CE69-417A-B060-74DAB25E3A54}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Png\DefaultIcon" name="" type="REG_SZ" value="%SystemRoot%\System32\imageres.dll,-71"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:40:51" uid="{FF654653-73C2-43EC-9FCE-24AD79738C43}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Png\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:41:45" uid="{BE45829D-6D4D-48C3-B701-E940226B566D}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Png\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="EditFlags" status="EditFlags" image="12" changed="2020-03-20 12:42:12" uid="{EC5A9C82-4D8C-4E71-8C65-3F521A5B7470}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Wdp" name="EditFlags" type="REG_DWORD" value="00010000"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ImageOptionFlags" status="ImageOptionFlags" image="12" changed="2020-03-20 12:42:38" uid="{44A34E0B-992D-4EE4-975A-427FA376C81A}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Wdp" name="ImageOptionFlags" type="REG_DWORD" value="00000001"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="DefaultIcon" status="(Default)" image="7" changed="2020-03-20 12:43:11" uid="{B704F2DE-70D1-44A5-900B-609D466739F2}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Wdp\DefaultIcon" name="" type="REG_SZ" value="%SystemRoot%\System32\wmphoto.dll,-400"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="MuiVerb" status="MuiVerb" image="7" changed="2020-03-20 12:44:03" uid="{C3877333-B9B3-4F8F-B487-7735FEF9DC6E}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Wdp\shell\open" name="MuiVerb" type="REG_EXPAND_SZ" value="@%ProgramFiles%\Windows Photo Viewer\photoviewer.dll,-3043"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="command" status="(Default)" image="7" changed="2020-03-20 12:44:30" uid="{EF90B883-3446-45DF-A9F8-7CABFA4ADB09}"><Properties action="U" displayDecimal="0" default="1" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Wdp\shell\open\command" name="" type="REG_EXPAND_SZ" value="%SystemRoot%\System32\rundll32.exe &quot;%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll&quot;, ImageView_Fullscreen %1"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="Clsid" status="Clsid" image="7" changed="2020-03-20 12:45:06" uid="{97368AB3-C0A6-4D93-8AB0-05CB8C528E37}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_CLASSES_ROOT" key="PhotoViewer.FileAssoc.Wdp\shell\open\DropTarget" name="Clsid" type="REG_SZ" value="{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ApplicationDescription" status="ApplicationDescription" image="7" changed="2020-03-20 12:46:50" uid="{C24BFFF8-7CC2-4157-88F6-832B29C14CF1}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities" name="ApplicationDescription" type="REG_SZ" value="@%ProgramFiles%\Windows Photo Viewer\photoviewer.dll,-3069"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name="ApplicationName" status="ApplicationName" image="7" changed="2020-03-20 12:47:13" uid="{F197301F-7DE8-44DA-A71C-529226A54C08}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities" name="ApplicationName" type="REG_SZ" value="@%ProgramFiles%\Windows Photo Viewer\photoviewer.dll,-3009"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".bmp" status=".bmp" image="7" changed="2020-03-20 12:47:48" uid="{04687C41-7FC7-4FDD-970B-2C029D38C57F}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".bmp" type="REG_SZ" value="PhotoViewer.FileAssoc.Bitmap"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".dib" status=".dib" image="7" changed="2020-03-20 12:48:26" uid="{2C81593E-4406-4938-8C26-70E80ADC3162}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".dib" type="REG_SZ" value="PhotoViewer.FileAssoc.Bitmap"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".gif" status=".gif" image="7" changed="2020-03-20 12:48:49" uid="{7D3386C2-D482-4E6D-A8AB-C6C3E16D5E5F}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".gif" type="REG_SZ" value="PhotoViewer.FileAssoc.Gif"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".jfif" status=".jfif" image="7" changed="2020-03-20 12:49:09" uid="{79162896-0EB2-4382-BD9E-DDA23A1823B2}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".jfif" type="REG_SZ" value="PhotoViewer.FileAssoc.JFIF"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".jpe" status=".jpe" image="7" changed="2020-03-20 12:49:37" uid="{A22C4574-B35F-45B9-B8A4-8A339221E911}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".jpe" type="REG_SZ" value="PhotoViewer.FileAssoc.Jpeg"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".jpeg" status=".jpeg" image="7" changed="2020-03-20 12:50:08" uid="{E2AB304C-3E6D-4A8F-8DB7-B3D82E6D24BD}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".jpeg" type="REG_SZ" value="PhotoViewer.FileAssoc.Jpeg"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".jpg" status=".jpg" image="7" changed="2020-03-20 12:50:32" uid="{98050833-9901-48CF-BDCF-3246D6CBD430}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".jpg" type="REG_SZ" value="PhotoViewer.FileAssoc.Jpeg"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".jxr" status=".jxr" image="7" changed="2020-03-20 12:50:53" uid="{BE414F2F-F6AF-4BF1-94BF-B9349D306FDB}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".jxr" type="REG_SZ" value="PhotoViewer.FileAssoc.Wdp"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".png" status=".png" image="7" changed="2020-03-20 12:51:18" uid="{2607795B-A4E5-49B6-9074-F5B2A52DBFDF}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".png" type="REG_SZ" value="PhotoViewer.FileAssoc.Png"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".tif" status=".tif" image="7" changed="2020-03-20 12:51:43" uid="{73097066-8C4B-4D0B-BDE1-C123791EFD98}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".tif" type="REG_SZ" value="PhotoViewer.FileAssoc.Tiff"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".tiff" status=".tiff" image="7" changed="2020-03-20 12:52:02" uid="{7FC5395F-FEAE-45D1-B0B6-0B8B9EDFB6C2}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".tiff" type="REG_SZ" value="PhotoViewer.FileAssoc.Tiff"/></Registry>
	<Registry clsid="{9CD4B2F4-923D-47f5-A062-E897DD1DAD50}" name=".wdp" status=".wdp" image="7" changed="2020-03-20 12:52:27" uid="{F81A621E-1D6F-494E-9BC4-595A750BF82D}"><Properties action="U" displayDecimal="0" default="0" hive="HKEY_LOCAL_MACHINE" key="SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" name=".wdp" type="REG_SZ" value="PhotoViewer.FileAssoc.Wdp"/></Registry>
</Collection>

AD Change Roaming profile Path Terminal server

I created this script because of moving the profiles to a server in the data center were also the terminal server is located.

Powershell needs to be runned as Administrator

########
## created by Daag van der Meer
## blog.van-daag.nl
## 26-04-2018
########
#
# Script is used to set Homedrive, RDP Homedrive, Profilepath, RDP profile path.
#
# Script needs to be runned as Admin!!!


Import-Module ActiveDirectory
     # On the Domain Controller There is on C:\Temp\Users.txt with the usernames to change the path

foreach ($user in (get-content c:\temp\Users.txt)) {
    ## Homedrive and profile location
    $homeDirectory = '\\<NewServer>\home$\<Country>\' + $user; 
    $ProfilePath = '\\<NewServer>\Profile$\<Country>\' + $user; 

    ## Set homedrive (DISABLE THIS IF YOU DON'T WANT TO CHANGE THIS)
    # Finally set their home directory and home drive letter in Active Directory
    Set-ADUser -Identity $user -HomeDirectory $homeDirectory -HomeDrive H
	
	## Set Profile (DISABLE THIS IF YOU DON'T WANT TO CHANGE THIS)
		Set-ADUser -Identity $user -ProfilePath $ProfilePath
        
        ## Set RDP Profile and Homedrive
        Get-ADUser -Filter "SAMAccountName -like '$user*'"| ForEach-Object {
        $ADSI = [ADSI]('LDAP://{0}' -f $_.DistinguishedName)
        try {
            $ADSI.InvokeSet('TerminalServicesProfilePath',$ProfilePath)
            $ADSI.InvokeSet("TerminalServicesHomeDrive","H:")
            $ADSI.InvokeSet("TerminalServicesHomeDirectory",$homeDirectory)
            $ADSI.SetInfo()
        }
        catch {
            Write-Error $Error[0]
        }
}
	
}

 

Outlook displays “Disconnected” in the status bar if the last character in the legacyExchangeDN attribute is a space

Applies to: Outlook 2016Outlook 2013

Symptoms


In Microsoft Outlook 2016 or Outlook 2013, you experience one or several of the following symptoms:

  • You receive the following error message:
    The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook.

  • You receive the following error message when you start Outlook:
    Cannot start Microsoft Outlook. Cannot open the Outlook window. The set of folders cannot be opened. The file C:\Users\<username>\AppData\Local\Microsoft\Outlook\user@doamin.com.ost is not an Outlook data file (ost).
  • Outlook displays one of the following message in the status bar:
    Trying to connect…
    Disconnected

Cause


This issue occurs if there is a trailing space (that is, if a space is the last character) in the legacyExchangeDN attribute.

Resolution


To resolve this issue, remove the trailing space from the legacyExchangeDN attribute by using ADSIEdit.msc. To do this, follow these steps.

Important After you make this change in the legacyExchangeDN attribute, recipients who previously received an email message from this user will receive a non-delivery report (NDR) message if they try to reply to an email message that they received from this user before the change was made. This problem will not occur for replies to new email messages that the user sends after the change was made.

  1. Open the Run dialog box. To do this, use one of the following methods, as appropriate for your situation:
    • Windows 10, Windows 8.1 or Windows 8: Press the Windows key + R.
    • Windows 7 or Windows Vista: Click Start, and then click Run.
  2. Type ADSIEdit.msc, and then press Enter.
  3. Expand the Default naming context to CN=Users.
  4. Select the user account whose mailbox is prompting the error.
  5. Right-click this account, and then click Properties.
  6. Locate the legacyExchangeDN attribute, and then click Edit.
  7. Remove the trailing space at the end of the username.
  8. Click OK, click Apply, and then exit ADSIEdit.msc.
  9. Have the user exit and then restart Outlook.

Source: Microsoft

Finding WWN’s on Windows Server 2012 Using PowerShell

With a single command you can retrieve WWN’s on Windows Server 2012 R2 using PowerShell.

Open the PowerShell command and type:

Get-WmiObject -class MSFC_FCAdapterHBAAttributes -namespace “root\WMI” | ForEach-Object {(($_.NodeWWN) | ForEach-Object {“{0:x}” -f $_}) -join “:”}

And that is all there is to it. Simple and fast using PowerShell.

Update: I have been been made aware of another way to get the WWN on Windows 2012 R2 with a cmdlet called get-initiatorport which was added to Windows Server 2012 R2. This is a much cleaner way of retrieving the WWN information instead of the WMI call.

 

PS C:\> Get-InitiatorPort

InstanceName NodeAddress PortAddress ConnectionType
------------ ----------- ----------- --------------
PCI\VEN_10DF&DEV_F100&SUBS... 20000090fa56b930 10000090fa56b930 Fibre Channel
PCI\VEN_10DF&DEV_F100&SUBS... 20000090fa56b931 10000090fa56b931 Fibre Channel

You can also filter the display and just get the PortAddress

PS C:\> Get-InitiatorPort | Select-Object -Property PortAddress | Format-Table -AutoSize

PortAddress
-----------
10000090fa56b930
10000090fa56b931

More information on get-initiatorport and many other storage related cmdlets can be found here!

 

Site

Windows 10 Professional 1703 – Turn Off Automatic Installation of Suggested Apps

For Windows 10 Professional it is not possible to do this with GPO. So add in the GPO this to the register.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager

SilentInstalledAppsEnabled DWORD
0 = Disable
1 = Enable

I Also disabked PreInstalledAppsEnabled

Located HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager

PreInstalledAppsEnabled DWORD
0 = Disable
1 = Enable