en-US/about_PSWinOps.help.txt
|
TOPIC
about_PSWinOps SHORT DESCRIPTION PSWinOps is a Windows-only PowerShell module for system administration, Active Directory management, health checks, network diagnostics, NTP management, RDP session management, VSS shadow copy management, Windows Update management, and more. LONG DESCRIPTION PSWinOps is a comprehensive toolbox designed for Windows system administrators running PowerShell 5.1 or later. It provides a curated collection of functions organized into fourteen functional domains, covering everything from Active Directory inventory and security auditing, service health monitoring, network troubleshooting, NTP synchronization, proxy management, RDP session control, Windows Update management, and general system information gathering. The module follows PowerShell best practices: every public function returns strongly-typed [PSCustomObject] instances, supports -WhatIf/-Confirm where appropriate, and works transparently against local or remote machines via WinRM. Author : Franck SALLET Repository : https://github.com/k9fr4n/PSWinOps License : See repository for license details Requires : PowerShell 5.1+ / Windows only FUNCTION DOMAINS PSWinOps organizes its functions into fourteen domains. activedirectory (22 functions) Functions for Active Directory inventory, user and computer management, group membership analysis, replication monitoring, and security auditing. Requires the ActiveDirectory RSAT module. Disable-ADUserAccount Enable-ADUserAccount Get-ADComputerDetail Get-ADComputerInventory Get-ADDomainInfo Get-ADGroupInventory Get-ADGroupMembership Get-ADLockedAccount Get-ADNestedGroupMembership Get-ADPasswordStatus Get-ADPrivilegedAccount Get-ADReplicationStatus Get-ADSiteTopology Get-ADStaleAccount Get-ADStaleComputer Get-ADUserDetail Get-ADUserGroupInventory Get-ADUserInventory Invoke-ADSecurityAudit Reset-ADUserPassword Search-ADObject Unlock-ADUserAccount certificate (1 function) Functions for auditing local machine certificate stores for certificates nearing or past expiration. Get-ExpiringCertificate eventlog (9 functions) Functions for correlating Windows System and Security event log entries into lockout-source, shutdown/restart, failed-logon, application-crash, storage-error, Schannel TLS, scheduled-task, Service Control Manager crash, and Windows Update failure reports. Get-ADLockoutSource Get-DiskErrorEvent Get-LogonFailure Get-ProcessCrashEvent Get-SchannelError Get-ScheduledTaskFailure Get-ServiceCrashEvent Get-UnexpectedShutdown Get-WindowsUpdateFailure healthcheck (16 functions) Functions that evaluate the health of Windows roles and services. Each returns an OverallHealth property (see the OVERALLHEALTH VALUES section below). Get-AdDomainControllerHealth Get-ADFSHealth Get-CertificateAuthorityHealth Get-ClusterHealth Get-DfsNamespaceHealth Get-DfsReplicationHealth Get-DhcpServerHealth Get-DnsServerHealth Get-ExchangeServerHealth Get-FileServerHealth Get-HyperVHostHealth Get-IISHealth Get-PrintServerHealth Get-RDSHealth Get-ServiceHealth Get-WSUSHealth iis (9 functions) Functions for managing IIS sites, HTTPS bindings, log file analysis, real-time log streaming, worker process monitoring, in-flight request inspection, certificate binding validation, and application pool lifecycle history reconstruction across local or remote servers. Get-IISAppPoolHistory Get-IISCertificateBinding Get-IISCurrentRequest Get-IISFailedRequestTrace Get-IISParsedLog Get-IISWorkerProcess Set-IISBindingCertificate Test-IISBindingCertificate Watch-IISLog network (26 functions) Functions for network diagnostics, discovery, certificate inspection, and real-time monitoring. Clear-Arp Edit-HostsFile Export-NetworkConfig Get-ARPTable Get-ListeningPort Get-NetworkAdapter Get-NetworkCIDR Get-NetworkConnection Get-NetworkRoute Get-NetworkStatistic Get-ProcessByPort Get-PublicIPAddress Get-SSLCertificate Get-SubnetInfo Measure-NetworkLatency New-NetworkRoute Remove-NetworkRoute Reset-NetworkStack Resolve-MACVendor Set-NetworkRoute Show-NetworkStatisticMonitor Show-PingMonitor Test-DNSResolution Test-PortConnectivity Test-WinRM Trace-NetworkRoute ntp (5 functions) Functions for querying and managing NTP time synchronization on Windows machines. Get-NTPConfiguration Get-NTPPeer Get-NTPSyncStatus Set-NTPClient Sync-NTPTime proxy (4 functions) Functions for inspecting and configuring proxy settings. Get-ProxyConfiguration Remove-ProxyConfiguration Set-ProxyConfiguration Test-ProxyConnection rdp (6 functions) Functions for managing Remote Desktop sessions on Windows servers. Connect-RdpSession Disconnect-RdpSession Get-RdpSession Get-RdpSessionHistory Get-RdpSessionLock Remove-RdpSession security (1 function) Functions for auditing Windows security configuration, starting with advanced audit policy subcategory reporting via auditpol.exe. Get-AuditPolicy system (20 functions) Functions for general system information, state, disk cleanup, profile management, and real-time monitoring. Clear-DiskCleanup Get-ComputerUptime Get-CrashDump Get-DiskCleanupInfo Get-DiskSpace Get-DriverInventory Get-EnvironmentVariable Get-InstalledSoftware Get-PageFileConfiguration Get-PendingReboot Get-RebootHistory Get-ScheduledTaskDetail Get-ServiceAccount Get-StartupProgram Get-SystemSummary Remove-UserProfile Set-EnvironmentVariable Set-PageFile Show-SystemMonitor Stop-ProcessTree windowsupdate (10 functions) Functions for querying and managing Windows Update on local or remote machines via the COM API and registry. Clear-WindowsUpdateCache Get-WindowsUpdate Get-WindowsUpdateConfiguration Get-WindowsUpdateHistory Hide-WindowsUpdate Install-WindowsUpdate Reset-WindowsUpdateComponent Save-WindowsUpdate Show-WindowsUpdate Uninstall-WindowsUpdate utils (4 functions) Pure utility functions that do not follow the standard ComputerName/Timestamp output convention. ConvertFrom-MisencodedString ConvertTo-Markdown New-RandomPassword Remove-StringDiacritic vss (6 functions) Volume Shadow Copy Service management. Create, list, remove shadow copies, inspect and configure storage allocation, and restore individual files from snapshots. Get-ShadowCopy Get-ShadowCopyStorage New-ShadowCopy Remove-ShadowCopy Restore-ShadowCopyFile Set-ShadowCopyStorage OUTPUT CONVENTIONS All public functions (except pure utilities) return [PSCustomObject] instances whose PSTypeName is set to 'PSWinOps.<ObjectType>'. Standard fields present on every object: ComputerName [string] The target machine name. Timestamp [string] ISO 8601 date/time string. Exception: the four utility functions listed above (ConvertFrom-MisencodedString, ConvertTo-Markdown, New-RandomPassword, Remove-StringDiacritic) do not include ComputerName or Timestamp fields. Custom format views are defined in the file PSWinOps.Format.ps1xml, which ships with the module. These views control default table and list output for each PSWinOps type. OVERALLHEALTH VALUES The 16 health check functions return an OverallHealth property. Its value is one of the following strings, formally defined by the [PSWinOpsHealthStatus] enum: Healthy All checks passed. The role or service is operating normally. Degraded The role or service is operational but some components need attention (e.g. partial replication, a stopped application pool). Critical The role or service has a serious issue requiring immediate action (e.g. service stopped, replication failed, all targets offline). RoleUnavailable The required Windows role or feature is not installed, or the management module is not available on the target machine. InsufficientPrivilege The current user lacks the permissions needed to query the role (e.g. a non-admin user querying DHCP server). Unknown Health status could not be determined due to an unexpected error or missing data. You can reference these values programmatically: [PSWinOpsHealthStatus]::Healthy [PSWinOpsHealthStatus]::Critical # Filter degraded or worse Get-ServiceHealth -ComputerName 'SRV01' | Where-Object { $_.OverallHealth -ne [PSWinOpsHealthStatus]::Healthy } REMOTE EXECUTION PATTERN Most functions accept two common parameters for remote execution: -ComputerName [string[]] One or more target machine names. Accepts pipeline input. The values $env:COMPUTERNAME, 'localhost', and '.' are detected automatically and cause the function to run locally without WinRM. -Credential [PSCredential] Alternate credentials for remote connections. Ignored for local machine queries. Remote execution uses Invoke-Command over WinRM. Errors on individual machines are caught and written as non-terminating errors so that remaining machines in the pipeline continue to be processed. PSWINOPS TYPE REGISTRY The following 120 PSTypeName values are defined by the module. Each corresponds to the output of one or more public functions. PSWinOps.ActionResult PSWinOps.ActiveRdpSession PSWinOps.ADAccountDisableResult PSWinOps.ADAccountEnableResult PSWinOps.ADAccountUnlockResult PSWinOps.ADComputerDetail PSWinOps.ADComputerInventory PSWinOps.AdDomainControllerHealth PSWinOps.ADDomainInfo PSWinOps.ADFSHealth PSWinOps.ADGroupInventory PSWinOps.ADGroupMember PSWinOps.ADLockedAccount PSWinOps.ADLockoutSource PSWinOps.ADNestedGroupMembership PSWinOps.ADPasswordResetResult PSWinOps.ADPasswordStatus PSWinOps.ADPrivilegedAccount PSWinOps.ADReplicationStatus PSWinOps.ADSearchResult PSWinOps.ADSecurityFinding PSWinOps.ADSiteTopology PSWinOps.ADStaleAccount PSWinOps.ADStaleComputer PSWinOps.ADUserDetail PSWinOps.ADUserGroupInventory PSWinOps.ADUserInventory PSWinOps.ArpEntry PSWinOps.AuditPolicy PSWinOps.CertificateAuthorityHealth PSWinOps.ClusterHealth PSWinOps.ComputerUptime PSWinOps.CrashDump PSWinOps.DfsNamespaceHealth PSWinOps.DfsReplicationHealth PSWinOps.DhcpServerHealth PSWinOps.DiskCleanupInfo PSWinOps.DiskCleanupResult PSWinOps.DiskErrorEvent PSWinOps.DiskSpace PSWinOps.DnsResolution PSWinOps.DnsServerHealth PSWinOps.DriverInventory PSWinOps.EnvironmentVariable PSWinOps.ExchangeServerHealth PSWinOps.ExpiringCertificate PSWinOps.FileServerHealth PSWinOps.HyperVHostHealth PSWinOps.IISAppPoolHistoryEvent PSWinOps.IISBindingCertificateResult PSWinOps.IISCertificateBinding PSWinOps.IISCertificateBindingTestResult PSWinOps.IISCurrentRequest PSWinOps.IISFailedRequestTrace PSWinOps.IISHealth PSWinOps.IISLogEntry PSWinOps.IISWorkerProcess PSWinOps.InstalledSoftware PSWinOps.ListeningPort PSWinOps.LogonFailure PSWinOps.MACVendor PSWinOps.NetworkAdapterInfo PSWinOps.NetworkCIDR PSWinOps.NetworkConfig PSWinOps.NetworkConnection PSWinOps.NetworkLatency PSWinOps.NetworkRoute PSWinOps.NetworkStackResetResult PSWinOps.NetworkStatistic PSWinOps.NtpConfiguration PSWinOps.NtpPeer PSWinOps.NtpResyncResult PSWinOps.NtpSyncResult PSWinOps.PageFileConfiguration PSWinOps.PendingReboot PSWinOps.PortConnectivity PSWinOps.PrintServerHealth PSWinOps.ProcessCrashEvent PSWinOps.ProcessKillResult PSWinOps.ProcessPort PSWinOps.ProxyConfiguration PSWinOps.ProxyTestResult PSWinOps.PublicIPAddress PSWinOps.RdpSessionAction PSWinOps.RdpSessionHistory PSWinOps.RdpSessionLock PSWinOps.RDSHealth PSWinOps.RebootHistory PSWinOps.SchannelError PSWinOps.ScheduledTaskDetail PSWinOps.ScheduledTaskFailure PSWinOps.ServiceAccount PSWinOps.ServiceCrashEvent PSWinOps.ServiceHealth PSWinOps.ShadowCopy PSWinOps.ShadowCopyRemoveResult PSWinOps.ShadowCopyRestoreResult PSWinOps.ShadowCopyResult PSWinOps.ShadowCopyStorage PSWinOps.ShadowCopyStorageResult PSWinOps.SSLCertificate PSWinOps.StartupProgram PSWinOps.SubnetInfo PSWinOps.SystemSummary PSWinOps.TraceRouteHop PSWinOps.UnexpectedShutdown PSWinOps.UserProfileRemoval PSWinOps.WindowsUpdate PSWinOps.WindowsUpdateCacheResult PSWinOps.WindowsUpdateConfiguration PSWinOps.WindowsUpdateDownloadResult PSWinOps.WindowsUpdateFailure PSWinOps.WindowsUpdateHideResult PSWinOps.WindowsUpdateHistory PSWinOps.WindowsUpdateInstallResult PSWinOps.WindowsUpdateResetResult PSWinOps.WindowsUpdateShowResult PSWinOps.WindowsUpdateUninstallResult PSWinOps.WinRMTestResult PSWinOps.WSUSHealth SEE ALSO https://github.com/k9fr4n/PSWinOps Get-Help Get-ServiceHealth Get-Help Get-RdpSession Get-Help Get-NTPConfiguration Get-Help Get-ADUserDetail Get-Help Get-DiskCleanupInfo Get-Help Get-ExchangeServerHealth Get-Help Get-ShadowCopy KEYWORDS PSWinOps, Windows, Administration, ActiveDirectory, DiskCleanup, HealthCheck, Network, NTP, RDP, Security, System, VSS, WindowsUpdate |