You are here: Windows OS HubPowershell

Archive for the 'Powershell' Category

Get-ADUser: Getting Active Directory Users Data via Powershell

Posted on February 14th, 2018 · Posted in Active Directory, Powershell
get-aduser table view

It’s no secret that from the first PowerShell version, Microsoft tries to make it the main administrative tool in Windows. And it mostly succeeds! Using simple examples, we’ll demonstrate PowerShell features of the Get-ADuser cmdlet to search for specific user objects in Active Directory domain and get different information about.. read more

Running PowerShell Startup Scripts Using GPO

Posted on February 2nd, 2018 · Posted in Group Policies, Powershell
running PowerShell Scripts from GPO

Many administrators use Group Policy feature of running startup / logoff scripts to perform different tasks. In addition to conventional BAT, CMD, VBS, etc. scripts, you can run PowerShell scripts using GPO as well. Let’s see how to configure it.

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