Some features of PowerShell when working with user accounts

I thought I was pretty good at powershell, but I never had to work with user credentials. However, now I'm looking for work and on one of the interviews I was given a test task to write a script that was supposed to:
 
1. Check the presence and status (enabled /disabled) of the user account.
 
2. Check whether the account is enabled in the "Administrators" group
 
3. If there is no account, then create an account and add it to the group of administrators, put the flags "Do not change the password by the user" and "The password is not expired"
 
4. If the account exists, but is disabled or not ...
+ 0 -

The effect of a small window on the user's memory, and what to do with it

The effect of a small window on the user's memory, and what to do with it
 
Even with the release of Windows Vista200? administrators faced a small but unpleasant problem: the warning of the expiry of the password was lonely appearing in the most inconspicuous corner of the screen. And this instead of the window is right in the center, as it was before!
 
Hence the change of passwords at the last moment, to the accompaniment of access failures; and indignation, why suddenly stopped working VPN, and what to do with it on a business trip. Of course, not a problem of the year, but a phenomenon intrusive and unpleasant. Therefore, we understand how to overcome it. ...
+ 0 -

Free of charge, quickly, easily and easily obtain information about the system from a variety of PCs in the

Free of charge, quickly, easily and easily obtain information about the system from a variety of PCs in thenetwork.In the process of work of any IT specialist there are times when you need to get information about the system. Sometimes you need to build one or a number of system parameters from multiple workstations and quickly process them. The more promptly the information will be received, the better of course. In this article I want to introduce the powershell module, with which you can quickly get almost any information about the system. For example: I was able to collect information about the size of RAM from several hundred workstations, spending a little more than twenty seconds!  Github    The main ...
+ 0 -

We manage copying Active Directory attributes when duplicating user accounts

We manage copying Active Directory attributes when duplicating user accounts
 
Many companies use additional Active Directory attributes that are copied together with duplication of the user account. But there are lots of examples when it is inconvenient. Therefore, in this article I will tell you how to avoid such behavior or change it to suit your needs. Excel instead of PowerShell: requests to AD and system reports "on the knee" .
 
We turn logs as we want - analysis of logs on Windows systems .
 
Cross-pollination: we manage Linux from under Windows, and vice versa .
  Many companies use additional Active Directory attributes that are copied together with duplication of the user account. But there are lots of examples when it is inconvenient. Therefore, in this article I will tell you how to avoid such behavior or change it to suit your needs. Excel instead of PowerShell: requests to AD and system reports "on the knee" .  We turn logs as we want - analysis of logs on Windows systems .  Cross-pollination: we manage Linux from under Windows, and vice versa . ...
+ 0 -

Another example of automation or PowerShell + Google Apps Script

Another example of automation or PowerShell + Google Apps ScriptLaziness is the engine of progress
 
 
So I, after finding some free time, decided to automate a fairly routine task for each admin - creating and disconnecting users.
 
Apps Script . It is based on jаvascript. The abundance of documentation and a little programming experience helped to sort this out. Here similarly we transfer the given functions - the account is created.
 
 
With the same tool, we modify the Welcome-letter template, replacing% username%, etc. for real data and send pdf to HR, the boss, the new user and of course to himself.
 
 
function createUser ...
+ 0 -

A script for centralized backup of configurations of Mikrotik routers on Powershell

After the overgrowth of the infrastructure, a large number of routers of this manufacturer faced the issue of backup configurations in one storage. There were solutions to scripts executed on routers with unloading to ftp, but this is somewhat inconvenient, because requires the configuration of scripts on all routers is identical.
 
I decided to do this centrally by running a backup on the router using the ssh command to a temporary temp.backup file and uploading it via ftp.
 
 
 
# set the policy right away so that the command is not flushed during the transfer of
Set-ExecutionPolicy remotesigned ...
+ 0 -