The IoT market is growing at a rapid pace and manufacturers are under pressure to quickly provide new products. Can you be sure that your devices do what they're supposed to do, while still being secure?
Code for stale user accounts:
@echo off setlocal enabledelayedexpansion set LogFile=C:\Tools\staleAdPc.log if not exist "%LogFile%" goto SkipRename for %%f in ("%LogFile%") do ( for /f "tokens=1-3 delims=/ " %%a in ("%%~tf") do (set TimeStamp=%%c%%a%%b) set NewName=%%~nf.old.!TimeStamp!%%~xf echo Renaming "%LogFile%" to "!NewName!" ... ren "%LogFile%" "!NewName!" ECHO File date: %%~tf ) :SkipRename dsquery computer OU=Depts,DC=x -inactive 8 -limit 300 > %logfile% (for /f "tokens=2,3* delims=,=" %%i in (%logfile%) do @echo %%~i) > c:\tools\staleADPc1.log
@echo off setlocal set LogFile=C:\tools\staleADUser1-N.log if exist "%LogFile%" del "%LogFile%" for /f "delims=" %%a in ('dsquery.exe user "OU=Depts,DC=x" -o samid -limit 0 -inactive 8') do ( echo %%~a >>"%LogFile%" echo %%~a )
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.