{"id":277496,"date":"2016-04-01T21:09:03","date_gmt":"2016-04-01T17:09:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277496"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277496","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 PowerShell"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ac4\/129\/64e\/ac412964ee0e4595ad662ec82f185172.png\" alt=\"image\" align=\"left\"\/>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044e \u0438 \u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u044e \u043b\u044e\u0434\u0435\u0439 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 1\u0421.<\/p>\n<p>  \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u0438\u0437 1\u0421 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0441 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 1C \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f CSV \u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435:  <\/p>\n<table>\n<tr>\n<th>document type<\/th>\n<th>userName<\/th>\n<th>FIO<\/th>\n<th>Department<\/th>\n<th>Department<\/th>\n<\/tr>\n<tr>\n<td>\u043f\u0440\u0438\u0435\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443<\/td>\n<td>USERtester1<\/td>\n<td>\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/td>\n<td>\u0414\u0438\u0441\u043f\u043e\u043d\u0435\u043d\u0442<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b \u0434\u0438\u0441\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/td>\n<\/tr>\n<tr>\n<td>\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435<\/td>\n<td>USERtester2<\/td>\n<td>\u041f\u0435\u0442\u0440\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/td>\n<td>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u0438<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<td>\u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435<\/td>\n<td>USERtester3<\/td>\n<td>\u0421\u0438\u0434\u043e\u0440\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/td>\n<td>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u0438<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f<\/td>\n<\/tr>\n<\/table>\n<p>  <b><u>\u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (usrcreate; usrmove; usrdelete) \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439:<\/u><\/b><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u0438\u0435\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443<\/h4>\n<p>  \u0418\u0449\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u0430, \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u0433\u0440\u0443\u043f\u043f\u044b, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0432 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u043f\u0430\u043f\u043a\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u041d\u0430 \u043f\u043e\u0447\u0442\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0424\u0418\u041e \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0433\u0440\u0443\u043f\u043f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d.<\/p>\n<h4>\u041a\u0430\u0434\u0440\u043e\u0432\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u043d\u043e\u0432\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043d\u043e\u0432\u043e\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u0443 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u0440\u0443\u043f\u043f \u0438 \u0430\u0434\u0440\u0435\u0441 OU, \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0440\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u043e\u0432\u044b\u0435, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0435\u0433\u043e \u0432 OU, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043d\u043e\u0432\u043e\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u0443 (\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432 AD), \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041d\u0430 \u043f\u043e\u0447\u0442\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0442\u0434\u0435\u043b\u043e\u043c \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438.<\/p>\n<h4>\u0423\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u044f\u0449\u0438\u043a, \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u0441\u0435\u0445 \u0433\u0440\u0443\u043f\u043f, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442. \u041d\u0430 \u043f\u043e\u0447\u0442\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0438 \u0443\u0432\u043e\u043b\u0435\u043d.<\/p>\n<p>  <b><u>\u0421\u043a\u0440\u0438\u043f\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0440\u044f\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a:<\/u><\/b><\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u0441\u043d\u0430\u0441\u0442\u043e\u043a Exchange \u0438 Active Directory<\/h4>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043e\u0441\u043d\u0430\u0441\u0442\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442, \u0447\u0442\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 7 \u0441\u0435\u043a\u0443\u043d\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 $getstaff|$movestaff|$delstaff<\/h4>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0430\u043f\u043a\u0438.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442\u0430<\/h4>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u044f\u0432\u043a\u0438 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443\u0436\u0435 \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u044f\u0432\u043a\u0438 \u043d\u0430 \u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443\u0436\u0435 \u0431\u044b\u043b \u0443\u0432\u043e\u043b\u0435\u043d.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u0430:<\/b><\/p>\n<div class=\"spoiler_text\">\n<table>\n<tr>\n<th>$smtpserv<\/th>\n<td>\u041f\u043e\u0447\u0442\u043e\u0432\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430(\u0421\u0435\u0440\u0432\u0435\u0440)<\/td>\n<\/tr>\n<tr>\n<th>$smtpfrom<\/th>\n<td>\u041f\u043e\u0447\u0442\u043e\u0432\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430(\u041e\u0442 \u043a\u043e\u0433\u043e)<\/td>\n<\/tr>\n<tr>\n<th>$smtpto<\/th>\n<td>\u041f\u043e\u0447\u0442\u043e\u0432\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430(\u041a\u043e\u043c\u0443)<\/td>\n<\/tr>\n<tr>\n<th>$opertype<\/th>\n<td>\u0422\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c<\/td>\n<\/tr>\n<tr>\n<th>$usrname<\/th>\n<td>SamAccountName<\/td>\n<\/tr>\n<tr>\n<th>$FIO<\/th>\n<td>\u0424\u0430\u043c\u0438\u043b\u0438\u044f \u0418\u043c\u044f \u041e\u0442\u0447\u0435\u0441\u0442\u0432\u043e<\/td>\n<\/tr>\n<tr>\n<th>$curdate<\/th>\n<td>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0434\u0430\u0442\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0434\u0435\u043d\u044c.\u043c\u0435\u0441\u044f\u0446.\u0433\u043e\u0434<\/td>\n<\/tr>\n<tr>\n<th>$del<\/th>\n<td>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 $delstaff<\/td>\n<\/tr>\n<tr>\n<th>$delstaff<\/th>\n<td>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<th>$department<\/th>\n<td>\u041e\u0442\u0434\u0435\u043b<\/td>\n<\/tr>\n<tr>\n<th>$dir<\/th>\n<td>\u041c\u0435\u0441\u0442\u043e \u043a\u0443\u0434\u0430 1\u0421 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442 CSV<\/td>\n<\/tr>\n<tr>\n<th>$get<\/th>\n<td>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 $getstaff<\/td>\n<\/tr>\n<tr>\n<th>$getstaff<\/th>\n<td>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443<\/td>\n<\/tr>\n<tr>\n<th>$groups<\/th>\n<td>\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u0430<\/td>\n<\/tr>\n<tr>\n<th>$move<\/th>\n<td>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 $movestaff<\/td>\n<\/tr>\n<tr>\n<th>$movestaff<\/th>\n<td>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<th>$newusername<\/th>\n<td>\u0418\u043c\u044f<\/td>\n<\/tr>\n<tr>\n<th>$newusersurname<\/th>\n<td>\u0424\u0430\u043c\u0438\u043b\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<th>$Position<\/th>\n<td>\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c<\/td>\n<\/tr>\n<tr>\n<th>$sdel<\/th>\n<td>\u0420\u0430\u0437\u0441\u043f\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 $del<\/td>\n<\/tr>\n<tr>\n<th>$sget<\/th>\n<td>\u0420\u0430\u0437\u0441\u043f\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 $get<\/td>\n<\/tr>\n<tr>\n<th>$smove<\/th>\n<td>\u0420\u0430\u0437\u0441\u043f\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 $move<\/td>\n<\/tr>\n<tr>\n<th>$shablon<\/th>\n<td>SamAccountName \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/td>\n<\/tr>\n<tr>\n<th>$spisokf<\/th>\n<td>\u0421\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437 1\u0421<\/td>\n<\/tr>\n<tr>\n<th>$todayf<\/th>\n<td>\u0424\u0430\u0439\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c<\/td>\n<\/tr>\n<tr>\n<th>$usrcopyfrom<\/th>\n<td>\u0428\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/td>\n<\/tr>\n<tr>\n<th>$usrexist<\/th>\n<td>\u041b\u043e\u0433\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435<\/td>\n<\/tr>\n<tr>\n<th>$usrpath<\/th>\n<td>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 AD<\/td>\n<\/tr>\n<tr>\n<th>$usrprop<\/th>\n<td>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/td>\n<\/tr>\n<tr>\n<th>$usrdomain<\/th>\n<td>\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d<\/td>\n<\/tr>\n<tr>\n<th>$Session<\/th>\n<td>\u0421\u0435\u0441\u0441\u0438\u044f \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Exchange<\/td>\n<\/tr>\n<tr>\n<th>$usrshare<\/th>\n<td>\u0410\u0434\u0440\u0435\u0441 \u043f\u0430\u043f\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/td>\n<\/tr>\n<tr>\n<th>$pass<\/th>\n<td>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/td>\n<\/tr>\n<tr>\n<th>$company<\/th>\n<td>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/td>\n<\/tr>\n<tr>\n<th>$usrstate<\/th>\n<td>\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438<\/td>\n<\/tr>\n<tr>\n<th>$usrCity<\/th>\n<td>\u0413\u043e\u0440\u043e\u0434<\/td>\n<\/tr>\n<tr>\n<th>$usrStreetAddress<\/th>\n<td>\u0423\u043b\u0438\u0446\u0430 \u0434\u043e\u043c \u043a\u043e\u0440\u043f\u0443\u0441<\/td>\n<\/tr>\n<tr>\n<th>$curuserpath<\/th>\n<td>\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 AD<\/td>\n<\/tr>\n<tr>\n<th>$newuserpath<\/th>\n<td>\u0426\u0435\u043b\u0435\u0432\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 AD<\/td>\n<\/tr>\n<tr>\n<th>$usrmoveddep<\/th>\n<td>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0434\u0435\u043f\u0430\u0440\u0442\u0430\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043a\u0430\u0437\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435<\/td>\n<\/tr>\n<tr>\n<th>$usrmovedtit<\/th>\n<td>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043a\u0430\u0437\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435<\/td>\n<\/tr>\n<\/table>\n<p>  <b>\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445 $get|$move|$del<\/b>  <\/p>\n<table>\n<tr>\n<th>[0]<\/th>\n<td>\u0422\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0435\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443\/\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\/\u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435<\/td>\n<\/tr>\n<tr>\n<th>[1]<\/th>\n<td>SamAccountName<\/td>\n<\/tr>\n<tr>\n<th>[2]<\/th>\n<td>\u0424\u0418\u041e<\/td>\n<\/tr>\n<tr>\n<th>[3]<\/th>\n<td>\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c<\/td>\n<\/tr>\n<tr>\n<th>[4]<\/th>\n<td>\u041e\u0442\u0434\u0435\u043b<\/td>\n<\/tr>\n<\/table>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u0430\u043c \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"vbscript\">#\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438   $smtpserv = &quot;post.domain.local&quot;   $smtpfrom = &quot;AUTOUSERCHANGER@domain.local&quot;   $smtpto = &quot;sysadmin@domain.local&quot;   $encoding = [System.Text.Encoding]::UTF8   $smtpBody = &quot;&quot;    #\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0438\u0437 1\u0421   $dir= &quot;\\\\fileserver\\1C\\&quot;  #\u0414\u043e\u043c\u0435\u043d   $usrdomain=&quot;domain.local&quot;  #\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 csv \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438   $spisokf=Get-Childitem -File -Path $dir*.csv | Select-Object -ExpandProperty Name  #\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439   $curdate=Get-Date -Format dd.MM.yyyy   $todayf=$spisokf | Select-String $curdate   #\u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0437\u0430\u0433\u043e\u043d \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435   $getstaff= Get-Content $dir$todayf |Select-String &quot;\u043f\u0440\u0438\u0435\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443&quot;   $movestaff= Get-Content $dir$todayf |Select-String &quot;\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435&quot;   $delstaff= Get-Content $dir$todayf |Select-String &quot;\u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435&quot;    #\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 EXCHANGE \u0438 ActiveDirectory  if ($getstaff -ne $null -or $movestaff -ne $null -or $delstaff -ne $null) {     $Session=New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http:\/\/post.domain.local\/PowerShell\/ -Authentication Kerberos      Import-PSSession $Session -AllowClobber | out-null     Import-Module ActiveDirectory      } else {     Write-Host &quot;\u041d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438&quot; }    #\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f   function usrcreate ()  {   #\u041f\u0435\u0440\u0435\u0431\u043e\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443   ForEach ($get in $getstaff)     {  #\u0421\u043f\u043b\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430   $sget=$get -split (&quot;;&quot;)   $opertype = $sget[0]   $usrname=$sget[1]   $FIO=$sget[2]   $Position=$sget[3]   $department=$sget[4]  #\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f   $usrexist=Get-ADUser -filter {(SamAccountName -eq $usrname)} | Select-Object -ExpandProperty SamAccountName   if ($usrexist -eq $null)     {     #\u0428\u0430\u0440\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u0430\u043f\u043e\u043a      $usrshare=&quot;\\\\FILESERVER\\Users\\$usrname&quot;     #\u041f\u043e\u0438\u0441\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430      $shablon=Get-ADUser -filter { (physicalDeliveryOfficeName -like $department) -and (title -like $Position) -and (Enabled -eq $true) -and (SamAccountName -ne $usrname)} | Select-Object -ExpandProperty SamAccountName      $usrcopyfrom=$shablon[1]     #-Path      $usrprop= Get-ADUser -Identity $usrcopyfrom | Select-Object -ExpandProperty  DistinguishedName      $usrpath= ($usrprop -split ',',2)[1]     #-name      $newusername=($FIO-split ' ')[1]     #-Surname      $newusersurname=($FIO-split ' ')[0]          #-AccountPassword      $pass=&quot;Qwerty01&quot;     #-company      $company= Get-ADUser -Identity $usrcopyfrom -Properties Company | Select-Object -ExpandProperty  company     #-State      $usrstate= Get-ADUser -Identity $usrcopyfrom -Properties State | Select-Object -ExpandProperty  State     #-City      $usrCity= Get-ADUser -Identity $usrcopyfrom -Properties City | Select-Object -ExpandProperty  City     #-StreetAddress      $usrStreetAddress= Get-ADUser -Identity $usrcopyfrom -Properties StreetAddress | Select-Object -ExpandProperty  StreetAddress     #\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      New-ADUser `      -name $FIO `      -AccountPassword (ConvertTo-SecureString $pass -AsPlainText -Force) `      -ChangePasswordAtLogon $true `      -Company $company `      -Department $department `      -Description $Position `      -DisplayName $FIO `      -Enabled $true `      -HomeDirectory $usrshare `      -HomeDrive &quot;&lt;b&gt;\u0411\u0423\u041a\u0412\u0410 \u0414\u0418\u0421\u041a\u0410 \u0414\u041e\u041c\u0410\u0428\u041d\u0415\u0419 \u041f\u0410\u041f\u041a\u0418&lt;\/b&gt;&quot; `      -Path $usrpath `      -PostalCode &quot;&lt;b&gt;\u041f\u041e\u0427\u0422\u041e\u0412\u042b\u0419 \u0418\u041d\u0414\u0415\u041a\u0421 \u0426\u0418\u0424\u0420\u0410\u041c\u0418&lt;\/b&gt;&quot; `      -SamAccountName $usrname `      -UserPrincipalName &quot;$usrname@$usrdomain&quot; `      -State $usrstate `      -StreetAddress $usrStreetAddress `      -Surname $newusersurname `      -Title $Position `      -GivenName $newusername `      -City $usrCity `      -Office $department ` | out-null     #\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      Start-Sleep -Seconds 10     #\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430      $groups=Get-ADUser -Identity $usrcopyfrom -Properties memberof | Select-Object -ExpandProperty memberof|Add-ADGroupMember -Members $usrname -PassThru | Select-Object -ExpandProperty SamAccountName     #\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u043c \u0434\u0438\u0441\u043a\u0435 (\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0435\u0441\u0442\u044c \u043b\u0438 \u043f\u0430\u043f\u043a\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c)      if(!(Test-Path -Path $usrshare ))         {          New-item $usrshare -type directory | out-null          $acl = Get-Acl $usrshare          $acl | Format-List          $acl.GetAccessRules($true, $true, [System.Security.Principal.NTAccount])          $acl.SetAccessRuleProtection($true, $true)          $rule = New-Object System.Security.AccessControl.FileSystemAccessRule (&quot;$usrdomain\\$usrname&quot;,&quot;FullControl&quot;, &quot;ContainerInherit, ObjectInherit&quot;, &quot;None&quot;, &quot;Allow&quot;)          $acl.addAccessRule($rule)          Set-Acl $usrshare $acl | out-null         }         else         {          $acl = Get-Acl $usrshare          $acl | Format-List          $acl.GetAccessRules($true, $true, [System.Security.Principal.NTAccount])          $acl.SetAccessRuleProtection($true, $true)          $rule = New-Object System.Security.AccessControl.FileSystemAccessRule (&quot;$usrdomain\\$usrname&quot;,&quot;FullControl&quot;, &quot;ContainerInherit, ObjectInherit&quot;, &quot;None&quot;, &quot;Allow&quot;)          $acl.addAccessRule($rule)          Set-Acl $usrshare $acl | out-null         }       #\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u044f\u0449\u0438\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      Enable-Mailbox &quot;$usrname@$usrdomain&quot; -Database &quot;&lt;b&gt;\u0418\u041c\u042f \u0411\u0410\u0417\u042b \u0414\u0410\u041d\u041d\u042b\u0419 \u041f\u041e\u0427\u0422\u042b&lt;\/b&gt;&quot; | out-null        #\u0412\u044b\u0432\u043e\u0434 \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u0430      foreach ($group in $groups) {$smtpBody = $smtpBody +$group+&quot;`n`n&quot;}        #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443      Send-MailMessage -From $smtpfrom -Subject $opertype  -To $smtpto -Body &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $FIO ($usrname) &quot;&quot;$Position&quot;&quot; \u043e\u0442\u0434\u0435\u043b\u0430 &quot;&quot;$department&quot;&quot; \u0441\u043e\u0437\u0434\u0430\u043d.`n`n\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0433\u0440\u0443\u043f\u043f\u044b:`n$smtpBody&quot;  -SmtpServer $smtpserv -Encoding $encoding           #\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445      $smtpBody=&quot;&quot;    }     else     {      #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443         Send-MailMessage -From $smtpfrom -Subject $opertype  -To $smtpto -Body &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $FIO ($usrname) \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.&quot;  -SmtpServer $smtpserv -Encoding $encoding    }        #\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430         (Get-Content $dir$todayf) | Where-Object {$_ -notmatch $get} | Set-Content -Path $dir$todayf -Force   }  }  #\u0417\u0430\u043f\u0443\u0441\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f if ($getstaff -ne $null) {    #\u0417\u0430\u043f\u0443\u0441\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      #usrcreate     #\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432     Start-Sleep -Seconds 10      } else {     Write-Host &quot;\u041d\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f&quot; }   #\u041a\u0430\u0434\u0440\u043e\u0432\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435      function usrmove ()  {     ForEach ($move in $movestaff)   {   #\u0421\u043f\u043b\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430    $smove=$move -split (&quot;;&quot;)    $opertype = $smove[0]    $usrname=$smove[1]    $FIO=$smove[2]    $Position=$smove[3]    $department=$smove[4]   #\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f    $usrmoveddep =Get-ADUser -Identity $usrname -Properties Department |Select-Object -ExpandProperty Department    $usrmovedtit =Get-ADUser -Identity $usrname -Properties title |Select-Object -ExpandProperty title   if ($usrmoveddep -ne $department -or $usrmovedtit -ne $Position)   {    #\u041f\u043e\u0438\u0441\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430     $shablon=Get-ADUser -filter { (physicalDeliveryOfficeName -like $department) -and (title -like $Position) -and (Enabled -eq $true) } | Select-Object -ExpandProperty SamAccountName     $usrcopyfrom=$shablon[1]      #\u0417\u0430\u043c\u0435\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     Set-ADUser -Identity $usrname -Department $department -Description $Position -Title $Position -Replace @{physicalDeliveryOfficeName = $department}    #\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     $curuserpath= Get-ADUser -Identity $usrname |Select-Object -ExpandProperty DistinguishedName    #\u0426\u0435\u043b\u0435\u0432\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     $usrprop= Get-ADUser -Identity $usrcopyfrom | Select-Object -ExpandProperty  DistinguishedName     $newusrpath= ($usrprop -split ',',2)[1]      #\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     Move-ADObject -Identity $curuserpath -TargetPath $newusrpath    #\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f, \u0438 \u0432\u044b\u0432\u043e\u0434 \u043e\u0448\u0438\u0431\u043e\u043a.     $ConfirmPreference = &quot;None&quot;     $ErrorActionPreference = &quot;SilentlyContinue&quot;    #\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0433\u0440\u0443\u043f\u043f \u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u0440\u043e\u043c\u0435 domain users     Remove-ADPrincipalGroupMembership -Identity $usrname -MemberOf $(Get-ADPrincipalGroupMembership -Identity $usrname | Where-Object {$_.DistinguishedName -ne 'CN=Domain Users,CN=Users,DC=&lt;b&gt;domain&lt;\/b&gt;,DC=&lt;b&gt;local&lt;\/b&gt;'})    #\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430     $groups=Get-ADUser -Identity $usrcopyfrom -Properties memberof | Select-Object -ExpandProperty memberof|Add-ADGroupMember -Members $usrname -PassThru | Select-Object -ExpandProperty SamAccountName      #\u0412\u044b\u0432\u043e\u0434 \u0433\u0440\u0443\u043f\u043f \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u0430     foreach ($group in $groups) {$smtpBody = $smtpBody +$group+&quot;`n`n&quot;}       #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443     Send-MailMessage -From $smtpfrom -Subject $opertype  -To $smtpto -Body &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $FIO ($usrname) &quot;&quot;$Position&quot;&quot; \u043e\u0442\u0434\u0435\u043b\u0430 &quot;&quot;$department&quot;&quot; \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d.`n`n\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0433\u0440\u0443\u043f\u043f\u044b:`n$smtpBody&quot;  -SmtpServer $smtpserv -Encoding $encoding      #\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445     $smtpBody=&quot;&quot;     }   else   {     #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443       Send-MailMessage -From $smtpfrom -Subject $opertype  -To $smtpto -Body &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $FIO ($usrname) \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c &quot;&quot;$Position&quot;&quot; \u043e\u0442\u0434\u0435\u043b\u0430 &quot;&quot;$department&quot;&quot;&quot;  -SmtpServer $smtpserv -Encoding $encoding   }      #\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430       (Get-Content $dir$todayf) | Where-Object {$_ -notmatch $move} | Set-Content -Path $dir$todayf -Force  } }  #\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f if ($movestaff -ne $null) {    #\u0417\u0430\u043f\u0443\u0441\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      #usrmove     #\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432     Start-Sleep -Seconds 10      } else {     Write-Host &quot;\u041d\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f&quot; }  #\u0423\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435   function usrdelete () {       ForEach ($del in $delstaff)   {  #\u0421\u043f\u043b\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430    $sdel=$del -split (&quot;;&quot;)    $opertype = $sdel[0]    $usrname=$sdel[1]    $FIO=$sdel[2]    $Position=$sdel[3]    $department=$sdel[4]     #\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f    $usrdeleted =Get-ADUser -Identity $usrname | Where-Object {$_.Enabled -eq $false}      if ($usrdeleted -eq $null)   {    #\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f, \u0438 \u0432\u044b\u0432\u043e\u0434 \u043e\u0448\u0438\u0431\u043e\u043a.     $ConfirmPreference = &quot;None&quot;     $ErrorActionPreference = &quot;SilentlyContinue&quot;    #\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u044f\u0449\u0438\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     Disable-Mailbox -Identity &quot;$usrname@$usrdomain&quot; -confirm:$false    #\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0433\u0440\u0443\u043f\u043f \u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u0440\u043e\u043c\u0435 domain users     Remove-ADPrincipalGroupMembership -Identity $usrname -MemberOf $(Get-ADPrincipalGroupMembership -Identity $usrname | Where-Object {$_.DistinguishedName -ne 'CN=Domain Users,CN=Users,DC=&lt;b&gt;domain&lt;\/b&gt;,DC=&lt;b&gt;local&lt;\/b&gt;'})    #\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     $curuserpath = Get-ADUser -Identity $usrname |Select-Object -ExpandProperty DistinguishedName      #\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439     Move-ADObject -Identity $curuserpath -TargetPath &quot;OU=USER_DISABLE,OU=TO_DELETE_USER_COMPUTER_GROUP_OU,DC=&lt;b&gt;domain&lt;\/b&gt;,DC=&lt;b&gt;local&lt;\/b&gt;&quot;    #\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     Disable-ADAccount $usrname    #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443     Send-MailMessage -From $smtpfrom -Subject $opertype  -To $smtpto -Body &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $FIO ($usrname) &quot;&quot;$Position&quot;&quot; \u043e\u0442\u0434\u0435\u043b\u0430 &quot;&quot;$department&quot;&quot; \u0443\u0432\u043e\u043b\u0435\u043d \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d.&quot;  -SmtpServer $smtpserv -Encoding $encoding        }    else    {    #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043e\u0442\u0447\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443     Send-MailMessage -From $smtpfrom -Subject $opertype  -To $smtpto -Body &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c $FIO ($usrname) &quot;&quot;$Position&quot;&quot; \u043e\u0442\u0434\u0435\u043b\u0430 &quot;&quot;$department&quot;&quot; \u0443\u0436\u0435 \u0431\u044b\u043b \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d.&quot;  -SmtpServer $smtpserv -Encoding $encoding      }     #\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430       (Get-Content $dir$todayf) | Where-Object {$_ -notmatch $del} | Set-Content -Path $dir$todayf -Force  } }  #\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f if ($delstaff -ne $null) {    #\u0417\u0430\u043f\u0443\u0441\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f      usrdelete     #\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432     Start-Sleep -Seconds 10      } else {     Write-Host &quot;\u041d\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f&quot; } <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/280710\/\"> https:\/\/habrahabr.ru\/post\/280710\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ac4\/129\/64e\/ac412964ee0e4595ad662ec82f185172.png\" alt=\"image\" align=\"left\"\/>\u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044e \u0438 \u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u044e \u043b\u044e\u0434\u0435\u0439 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043a\u0430\u0434\u0440\u043e\u0432\u044b\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 1\u0421.<\/p>\n<p>  \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u0438\u0437 1\u0421 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0441 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 1C \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f CSV \u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0438\u0436\u0435:  <\/p>\n<table>\n<tr>\n<th>document type<\/th>\n<th>userName<\/th>\n<th>FIO<\/th>\n<th>Department<\/th>\n<th>Department<\/th>\n<\/tr>\n<tr>\n<td>\u043f\u0440\u0438\u0435\u043c \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443<\/td>\n<td>USERtester1<\/td>\n<td>\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/td>\n<td>\u0414\u0438\u0441\u043f\u043e\u043d\u0435\u043d\u0442<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b \u0434\u0438\u0441\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/td>\n<\/tr>\n<tr>\n<td>\u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435<\/td>\n<td>USERtester2<\/td>\n<td>\u041f\u0435\u0442\u0440\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/td>\n<td>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u0438<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<td>\u0443\u0432\u043e\u043b\u044c\u043d\u0435\u043d\u0438\u0435<\/td>\n<td>USERtester3<\/td>\n<td>\u0421\u0438\u0434\u043e\u0440\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/td>\n<td>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u0438<\/td>\n<td>\u041e\u0442\u0434\u0435\u043b \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f<\/td>\n<\/tr>\n<\/table>\n<p>  <b><u>\u0421\u043a\u0440\u0438\u043f\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (usrcreate; usrmove; usrdelete) \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439:<\/u><\/b>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-277496","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277496"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277496\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}