Lapas

piektdiena, 2017. gada 18. augusts

pirmdiena, 2017. gada 3. jūlijs

piektdiena, 2017. gada 30. jūnijs

Windows 10 lock screen picture file location

If you want to save some Windows Spotlight picture - open the folder:
C:\Users\<User>\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\

Look for the files with current date greater than 400KB.
Open files with MSPaint to find the exact one. Save it to *.jpg

Change AD user profile path

1. Find users SID:
wmic useraccount where name="USER" get sid

2. Open in regedit key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\User SID

3. Modify ProfileImagePath value

trešdiena, 2017. gada 4. janvāris

Change Office 365 sign-in name for AD synced user

To change Office 365 sign-in (Principal) name for user synced with Onsite AD:
  1. Start PowerShell
  2. Make sure the Microsoft Online module is loaded
  3. Execute the following command:
set-msoluserprincipalname -newuserprincipalname newuser@emailaddress.com -userprincipalname user@emailaddress.com.

Source: msonlinehelpdesk.zendesk.com

ceturtdiena, 2016. gada 17. novembris

Copy data to other location and retain permissions

@echo off

SET SRC="\\server\share"
SET DST="C:\WHERE YOU WANT FILES TO GO"
SET LOG="C:\Robocopy.log"

ROBOCOPY %SRC% %DST% /E /ZB /MIR /SEC /SECFIX /COPYALL /R:1 /W:1 /V /TEE /LOG:%LOG%
@if errorlevel 16 echo ***ERROR *** & goto END
@if errorlevel 8  echo **FAILED COPY ** & goto END
@if errorlevel 4  echo *MISMATCHES *      & goto END
@if errorlevel 2  echo EXTRA FILES       & goto END
@if errorlevel 1  echo --Copy Successful--  & goto END
@if errorlevel 0  echo --Copy Successful--  & goto END
goto END

:END

PAUSE


Here's what the switches mean:
  • SRC:: Source Directory (drive:\path or \\server\share\path).
  • DST:: Destination Dir  (drive:\path or \\server\share\path).
  • /E :: copy subdirectories, including Empty ones.
  • /ZB :: use restartable mode; if access denied use Backup mode.
  • /MIR :: Mirrors a directory tree.
  • /SEC :: Copies files with security
  • /SECFIX ::Fixes file security on all files, even skipped ones.
  • /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).  Copies the Data, Attributes, Timestamps, Owner, Permissions and Auditing info
  • /R:n :: number of Retries on failed copies: default is 1 million but I set this to only retry once.
  • /W:n :: Wait time between retries: default is 30 seconds but I set this to 1 second.
  • /V :: produce Verbose output, showing skipped files.
  • /TEE :: output to console window, as well as the log file.
  • /LOG:file :: output status to LOG file (overwrite existing log).
Source: community.spiceworks.com