You are here: Windows OS HubPowershell

Archive for the 'Powershell' Category

Getting AD Accounts Created in the Last 24 Hours

Posted on October 31st, 2017 · Posted in Active Directory, Powershell
getting list of recently created accounts in the active directory

The IT security department asked to develop the simplest audit system that will make up the daily statistics on Active Directory accounts created in the last 24 hours, and the information about who created these accounts in the domain. [contents h2] A PowerShell Script to Get the List of Recently.. read more

How to Create Scheduled Task Using PowerShell

Posted on October 26th, 2017 · Posted in Powershell, Windows Server 2008 R2, Windows Server 2012 R2
task settings xml file

Most administrators use the graphic interface of Taskschd.msc console to create Windows Task Scheduler jobs. However, in various scripts and automated jobs, it is much more convenient to use the PowerShell features to create scheduled tasks. In this article, we’ll show how to create new Windows Scheduler tasks, export tasks.. read more

Using PowerShell Behind a Proxy

Posted on September 15th, 2017 · Posted in Powershell
Invoke-WebRequest: Unable to connect to the remote server

If you access the Internet in the organization via the proxy server, by default you won’t be able to access an external webpage (Invoke-WebRequest cmdlet), update help using Update-Help cmdlet or download an application package from an external package repository (using PackageManagement or NanoServerPackage) from your PowerShell session. In this.. read more

How to Find Blocked, Disabled or Inactive Objects in AD Using Search-ADAccount

Posted on September 6th, 2017 · Posted in Active Directory, Powershell
Search-ADAccount out-gridview

Quite an often task of an Active Directory administrator is to make a list of disabled or inactive accounts and computers, or a list of accounts with expired passwords. To do it, you can use either the saved LDAP queries in the ADUC console, or already familiar PowerShell cmdlets, like.. read more

How to Access and Manage Windows Registry with PowerShell

Posted on June 2nd, 2017 · Posted in Powershell
powershell create registry parameter

Starting from its first version, PowerShell offers an administrator an extensive set of tools to interact with Windows system registry. If necessary, all typical operations with the registry can be performed not in the good old  Regedit interface, or reg.exe, but in PowerShell command prompt. In different scripts and scenarios.. read more

PowerShell Remoting via WinRM for Non-Admin Users

Posted on April 25th, 2017 · Posted in Powershell
Set-PSSessionConfiguration-Name Microsoft.PowerShell-showSecurityDescriptorUI

By default, to connect to a remote computer using PowerShell (PowerShell Remoting) you need the administrator privileges. In this article we’ll show how to allow remote connection using PowerShell Remoting (WinRM) for common users (without the administrator privileges) with the help of a security group, a Group Policy and modification.. read more

How to Sign PowerShell Script with a Code Signing Certificate

Posted on January 25th, 2017 · Posted in Powershell
SIG Begin signature block

A script or an executable with a digital signature allows a user to make sure that a file is original and its code has not been changed by third parties. PowerShell also has an integrated feature to sign a *.ps1 script files.

Hyper-V PowerShell Direct in Windows Server 2016

Posted on January 19th, 2017 · Posted in Hyper-V, Powershell, Windows Server 2016
Managing Hyper-V 2016 VMs using PowerShell Direct

PowerShell Direct is a new PowerShell feature in Windows Server 2016 and Windows 10 that allows to create a direct local PowerShell session with any virtual machine run on a Hyper-V host, meanwhile the connection is established not via the network, but  through the internal VM bus. Thus, a Hyper-V.. read more

Checking TCP Port Response Using PowerShell

Posted on December 2nd, 2016 · Posted in Powershell
Test-NetConnection check remote tcp port

From time to time, any administrator has to check service availability on a remote server  by testing remote TCP port response. Meanwhile, everybody got used to doing it quickly using telnet command. For example, to make sure the SMTP service is response on a mail server (by default, it responds.. read more

How to Import User Photo to Active Directory Using PowerShell

Posted on November 18th, 2016 · Posted in Active Directory, Powershell
import user photo to ad

Among user attributes starting from the version of Active Directory schema in Windows Server 2000, there is a special attribute thumbnailPhoto, in which a user photo (or any other images) can be stored as binary data. Outlook since 2010, Lync, SharePoint (and other applications) can use the data contained in.. read more