Tuesday, April 21, 2015

removing windows 2012 data deduplication volume

thanks to nickwhittome.com/2014/10/01/disabling-data-deduplication-on-windows-server-2012r2

#The unoptimise command
start-dedupjob -Volume E:   -Type Unoptimization
#Check the status
get-dedupjob

Then...

#Clean up the Garbage
start-dedupjob -Volume
E: -Type GarbageCollection
#Check the status
get-dedupjob


Then...
 
Disable-DedupVolume -Volume E:

Adobe Reader 10 - Access Denied opening PDF - solved

Some Operational team members moved some data to a Windows 2012 R2 server.
The Citrix Environment is currently in a 'change freeze' and was running 10.0.1.0 of adobe readerX.


When a pdf was opened from network share "access denied"
It could be fixed by untick protected mode.. but then we are unprotected right.

Note: Upgrading the Adobe reader also fixed this issue but 'Change Freeze'

so




Root Cause : Citrix version of Adobe Reader PDF is not trusting any de-duplicated pdf files as they have been “modified”

Process to replicate

  1. robocopy  "E:\Data\Group" E:\temp   *.pdf /s  /move
  2. robocopy   "E:\temp" "E:\Data\Group"   E *.pdf /s /move
  3. [pdf file attribute was A]
  4. Forced Dedup Job - Start-DedupJob E: -Type Optimization 
    (note our server was set to MinimumFileAgeDays 0)
  5. [pdf file attribute was APL]


so either



Set-DedupVolume –Volume E: -ExcludeFiletype pdf
 or
 Just disabled dedup on this volume.

/thx

Thursday, April 16, 2015

Active Directory ProxyAddress Email Addresses SMTP Extract with powershell

Bit of fun with extracting SMTP secondary addresses from user account.

$user=get-aduser testuser -prop,proxyAddresses

$user|select samaccountname,@{Name=”AdditionalAddresses”;Expression={($_.proxyAddresses| Foreach-object {$_.split([environment]::NewLine)} | Where-Object {$_ -match “smtp”} | ForEach-Object {$_.substring(5)}) -join "|"}}


so..

#
#Export Detailed AD Membership info
#dump a full member list text file only once per day
#

$outputfile = $savepath + "\" + $dayofweek + "_theuserlist.xlsx"
del $outputfile
$allpandas = get-aduser -filter {extensionattribute5 -eq "Pandas"}  -Properties displayname,title,company,department,lastlogondate,physicalDeliveryOfficeName,proxyAddresses,EmailAddress
$allpandas = $allpandas|select samaccountname,givenname,surname,displayname,title,company,department,UserPrincipalName,physicalDeliveryOfficeName,lastlogondate,EmailAddress,@{Name=”AdditionalAddresses”;Expression={($_.proxyAddresses| Foreach-object {$_.split([environment]::NewLine)} | Where-Object {$_ -match “smtp”} | ForEach-Object {$_.substring(5)}) -join "|"}}
$allpandas | C:\scripts\Export-XLSX.ps1 -Path $outputfile -WorkSheetName 'pandas'