PowerShell Logo

97 results found for the Operating System Category in about 0.016 seconds
Access 64bit registry values from 32bit powershell
When using the a 32bit powershell to access the registry on a 64bit machine it will fail to access certain registry keys because of registry redirection to the Wow6432Node location.

Change StartMode of a Service
This script uses WMI to change the start mode of a service.

Script to generate a HTML Hotfix Comparison Table on a set of computers

This script takes two servers and will tell you the delta of patches between the two servers.



Create or Modify registry key values remotely
Did you ever wanted to modify your registry or add a key/value pair to registry? Wished there was a script to help you do that? Even better, wished it can run remotely without PowerShell WinRM listener configured on target server?I had custom script that would modify certain regi

Determine OS and Service Pack Level Across Network


Determine OS and Service Pack Version
This PowerShell script reads a list of computers specified in a text file and outputs the Operating System Name and the Service Pack version Information to an excel spreadsheet in a tabular form.

Determine OS type,version and service pack using AD information
Getting OS type , build number and service pack version from active directory

Edit $ENV:Path in Powershell
Edit the System PATH statement globally in Windows Powershell with 4 new Advanced functions. Add-path, Set-path, Remove-path, Get-path - SUPPORTS -whatif parameter

Enable RDP Registry Setting
This script takes a listing of servers in a text file and set the fDenyTSConnections Registry setting to 0 to allow for remote connections.

Export Windows performance counter descriptions to CSV
This script queries the Windows performance counters on the local computer and exports the object names, counter names, and counter descriptions to a CSV file for easy reference.

Find Web pages stored in ZIP/RAR files.


Get counter information from local or remote systems


Get Operating System Version
Uses the Win32_OperatingSystem WMI class to determine the version of Windows in use.

Get System Install Date
Gets the system installation date. The script accepts input from the pipeline.

Get System Last Boot Up Time
This script uses WMI to get a system last boot up time. It accepts input from the pipeline.

Get Windows Experience Index
This function allows you to gather the Windows Experience Index values from local or remote computers.

Demonstrates using the System.Collections.Arraylist object

This script demonstrates how to use the Windows colour dialog from PowerShell.

Gets the cultures on a system and displays them. This script re-implements an MSDN sample using PowerShell.

Inspects all the DLLs in a path recursively and tells you what architecture they were compiled for. If they are unmanaged DLLs it will inform you that they are native binaries.

Get-DSTInfo - Determine Time Change Information With A Function - Outputs Object
The Get-DSTInfo function will check when a computer is scheduled for Daylight/Standard time changes.  It uses the WMI Win32_TimeZone and Win32_LocalTime class to poll the required information.    

Demonstrates GetHost Entry method of System.Net.Dns class

Get-Hotfix with multiple options and e-mail report (Powershell)
This uses get-hotfix to pull information from a single server, or multiple manually entered servers or a txt file containing the server names. Also provide the hotfix information in .txt and .html saved to your local hard drive and e-mails the above files to you as well.

This script checks to see if the passsed string is either an IPv4 or IPv6 loopback address and if so, displays details.

Demonstrates the use of the Persian Calendar object in the System.Globalization namespace.

This advanced function allows you to query remote and local machines for their certificates and also report back which ones are expired or expiring.



Script for getting information about services running on multiple computers.

Demonstrates the Um Al Qura calendar.

This script gets a list of VMs running on a Hyper-V Host

This script obtains the names of all the namespaces on a computer.

Getting & Setting Page File & Memory dump (Manual / Automated)
This script will help us to get & set Page File & Memory dump (Manual / Automated).

hardware and software inventory Collection From AD or Txtfile into Excel sheet
the script takes a number of servers as an input and produces custom objects with certian properties like (name , rams , cpu , installed applications ...) which can be pipelined to export-csv to produce an excel readable file

Hyper-V Certificate Validation Workaround
If certificate verification delays are causing long VM start up time, run this script to set up a workaround using Hyper-V registry key for certificate validation. This should allow faster VM start when experiencing network issues that delay validation.

Identify the Version of DirectX Installed on a Computer


Invoke Best Practices Analyzer on remote computers
Script to invoke Best Practices Analyzer on remote computers.

List certificates by days until expiration
PowerShell one-liner to show unexpired certs by number of days until they expire.

List Classic COM Class Settings
Returns configuration information for the “classic” COM classes installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Fr

List Classic COM Classes
Retrieves information about all the “classic” COM classes installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framewor

List Component Categories
Retrieves information about the COM class component categories (COM classes that share common functionalities) found on a computer. This script requires both Windows PowerShell a

List Computer System Properties
This code demonstrates how to list Computer System information for the local system without any plug-ins.

List DCOM Application Settings
Returns information about the configuration of each DCOM (distributed COM) application installed on a computer. This script requires both Windows PowerShell and the corresponding

List DCOM Applications
Returns information about all the DCOM (distributed COM) applications installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .

List Information about the Threads Active on a Computer
Returns a list of threads and thread states for each process running on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framewo

List Installed Hot Fixes
Returns a list of all the hot fixes installed on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more informatio

List Operating System Properties
Retrieves information about the operating system installed on a computer, including language, encryption level, and build number. This script requires both Windows PowerShell and

List Operating System Properties
This code demonstrates how to list Operating System information for the local system without any plug-ins.

List Page File Properties
Lists the properties of all the page files on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more information o

List Page File Settings
Returns information about the initial and maximum sizes of all the page files on a computer. This script requires both Windows PowerShell and the corresponding version of the .NE

List Page File Use
Retrieves page file usage statistics. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more information on downloading these

List ProgIDs
Returns a list of ProgIDs (Programmatic Identifiers) found on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For mo

List Registry Properties
Returns information about the computer registry. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more information on downloa

List Remote Application on Computer
Using Powershell, Query a list of PC's to find all applications installed. Write output to console with computer name and application name

List Scheduled Tasks
Enumerates all the scheduled tasks on a computer. Note: WMI can only enumerate scheduled tasks created using the Win32_ScheduledJob class or the At.exe utility. It cannot enumerat

List Scheduled Tasks That Failed to Run


List Service Data in a Spreadsheet


List Service Load Order Groups
Returns a list of all the service load order groups found on a computer, and well as their load order. This script requires both Windows PowerShell and the corresponding version

List Service Properties
Retrieves a complete list of services and their associated properties. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more

List Services where StartMode is AUTOMATIC that are NOT running
This script will list services from a local or remote computer where the StartMode property is set to "Automatic" and where the state is different from RUNNING (so mostly where the state is NOT RUNNING)

List the Local Time on a Computer
Returns information about the local time configured on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more info

List the Processes Running on a Computer
Returns information about all the processes running on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more info

List the UTC Time on a Computer
Reports the Universal Time Coordinate (UTC) time on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more informa

List Time Zone Information for a Computer
Retrieve information about the time zone configured on a computer. This script requires both Windows PowerShell and the corresponding version of the .NET Framework. For more info

Monitor Failover Cluster Health
Once I needed to keep a close eye to a File Cluster however at this particular time no proper Monitoring Solution was in place so I decided to write my own "Poor Man's Montitoring Solution" observing the items I was interested in.

Non-responsive Safe System Shutdown
Safely shuts down your computer, rather than a un-expected reboot.

Percent Uptime Calculator
This script calculates the real percent uptime for a server, it does not just return the amount of time since last reboot.

Performance Monitoring with config file build that writes to SQL database
This script it used to gather performance data and upload it to SQL. An option to build an XML config file that can be ran against the script to decide what counters to use.

Ping Computers Using Windows PowerShell


Powershell Measure-PerfLog function
This Powershell function will summarize performance logs generated by Windows Performance Logs and Alerts. It uses the Powershell Import-Counter cmdlet.  Using the raw data, Measure-PerfLog will summarize the data by performance counter, and can be easily exported to CSV.

PowerShell Script Remove-StartupItems.ps1
Enumerate items in Startup locations, checks for original file name then, if changed remove item, checks against custom safe list and safe vendor list. If not in either safe list, remove item.

PowerShell WMI Permanent Events
Here is an eventing demo. It will be updated as I fix and add documentaion.  Check back.  

Will show the ProductType

PS- Get status report of one or more hotfixes from one or more computers
This script searches for the installation status of one or more hotfixes. You can supply the hotfixes from command line, or type them into the script. It will read a text file for comptuer names, or you can type them from the PS line when you run it. It will write to a log file.

PS- WMI Query that returns Service 'State' on a group of devices
Creates a list of devices from Active Directory and queries each device that responds with ping reply for a specific service running. Outputs Status of Service for each device.

Rebooting a Server
This is a simple script to reboot a server.

Registry Security PowerShell Module
Allows a much easier management of permissions inside the registry database using PowerShell

Remotely execute cmd.exe commands on multiple computers
This script invokes whatever command you can use in cmd.exe on one or more computers remotely like {del , netstart , ipconfig /flushdns}

This script removes a file on a FTP Server.

Removes a hypothetical service

Removing old diff files from a backup disk location
This script will remove old differential backup images from a disk location leaving only the base images.

Scan PowerShell Installation and Version
This script receives a list of computers from a text file and then scans each one to determine if PowerShell is installed. If it is, the script then determines whether it is PowerShell 1.0 or 2.0. The script then returns the results to the screen.

Script to migrate scheduled tasks from Windows XP/Server 2003 to 7/Server 2008
Based on http://www.digitalforensics.be/blog/?p=205Script to migrate scheduled tasks from Windows XP/2003 to Windows 7/2008 task scheduler. Provides an alternative,if running "schtasks /query /s" from the Win 7 machine connecting to the XP machine remotely is not an option.

Send files to Compressed Zipped Folder
Conversion of VB.Net Function written by Steve Fulton to send files / folders to compressed zipped folder in Windows

Set SEHOP flags (DisableExceptionChainValidation) in registry
Set SEHOP flags (DisableExceptionChainValidation) in registry, both the system-wide flag and the per-process IFEO flags.

Sets service state for remote machines, single and from a list. start/stop/restart with a clean exportable format.

Set-TimeZone function (PowerShell)
Set the system time zone with a simple function.

Show Installed Windows Roles and Features
PowerShell one-liner to show which Windows roles and features are currently installed.

Start AutoStart Services that have Stopped
Restarts any auto-start services that have been stopped.

Start Services on Remote Computer
This script will start Automatic services on a remote server that have either failed to start or have stopped. It's specifically looking for Exchange 2010 services, but the code can be easily adjusted for any services. Assumes WS-MAN and PowerShell v2.

Start, Stop, Enable, Disable Services Remotely - Updated Script
I have updated one of old Powershell scripts (http://portal.sivarajan.com/2010/07/stopstart-or-enabledisable-service.html) based on a comment posted on my blog.

Stop, Start, Enable or Disable Service


Terminate running process on multiple servers
this script terminates a process running on a single or multiple computersnusing WMI class Win32_process

Use WPF UI Automation to Browse Windows UI Elements
The script uses .Net Framework and System.Windows.Automation classes to browse Windows UI elements hierarchy.

View Scheduled Jobs and report Status with notification
This script can run against a local or remote machine/s and can list all or only the failed jobs. An optional email notification can be sent out too when jobs have failed.

View Scheduled Tasks on Remote Computers
At times it is necessary to update passwords on service accounts or make other changes and it is hard to keep track of where that service account has been used.  One of the places that they are often used is in Scheduled Tasks.  This script allows you to query a computer for sche