regedit /e "%USERPROFILE%\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham
piektdiena, 2017. gada 18. augusts
pirmdiena, 2017. gada 3. jūlijs
Identify Windows 10 installation media build
Run Command Prompt as administrator
adism /Get-WimInfo /WimFile:F:\sources\install.esd /index:1
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:
Look for the files with current date greater than 400KB.
Open files with MSPaint to find the exact one. Save it to *.jpg
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:
2. Open in regedit key:
3. Modify ProfileImagePath value
wmic useraccount where name="USER" get sid2. Open in regedit key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\User SID3. Modify ProfileImagePath value
otrdiena, 2017. gada 24. janvāris
Delete old computers from Active Directory
Get list of inactive computer for 4 weeks:
dsquery computer –inactive 4
Source: portal.sivarajan.com
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:
Source: msonlinehelpdesk.zendesk.com
- Start PowerShell
- Make sure the Microsoft Online module is loaded
- 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
PAUSEHere'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).
Abonēt:
Ziņas (Atom)