Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Latest commit

 

History

History
44 lines (32 loc) · 1.06 KB

QuickStart.md

File metadata and controls

44 lines (32 loc) · 1.06 KB

Quick Start Guide

This guide provides several simple examples for how to use this module. For more information on the commands in this module, please see the Module Documentation.

View the Windows Event Log in PowerShell Core

Import-WinModule Microsoft.PowerShell.Management
Get-EventLog -Newest 5 -LogName "Application"

View the Windows Event Log on a Remote Computer

$Credential = Get-Credential
Initialize-WinSession -ComputerName SQLSERVER01 -Credential $Credential
Import-WinModule Microsoft.PowerShell.Management
Get-EventLog -Newest 5 -LogName "Application"

Create a Windows PowerShell Function in PowerShell Core

Add-WinFunction -FunctionName Get-WinPSVersion -ScriptBlock {
    $PSVersionTable
}
Get-WinPSVersion

Run a Command in Windows PowerShell from PowerShell Core

Invoke-WinCommand -ScriptBlock { $PSVersionTable }

Compare Modules in Windows PowerShell and PowerShell Core

Compare-WinModule