# https://github.com/iainbrighton/PScribo # help about_document
# create a folder to store generated documents $OutPath = "c:\temp\out" $exists = Test-Path-Path$OutPath if (!$exists) { $null = New-Item-Path$OutPath-ItemType Directory -Force }
# generate document Document 'ServiceReport' { # generate the service information to use # (requires PowerShell 5 because prior to PowerShell 5, Get-Service does not supply # StartType - alternative: use Get-WmiObject -Class Win32_Service, and adjust # property names) $services = Get-Service | Select-Object-Property DisplayName, Status, StartType
# generate a table with one line per service $services | # select the properties to display, and the header texts to use Table -Columns DisplayName, Status, StartType -Headers'Service Name','Current State','Startup Type'-Width0
# https://github.com/iainbrighton/PScribo # help about_document
# create a folder to store generated documents $OutPath = "c:\temp\out" $exists = Test-Path-Path$OutPath if (!$exists) { $null = New-Item-Path$OutPath-ItemType Directory -Force }
# generate document Document 'ADUser' { # get 40 AD user to illustrate $user = Get-ADUser-Filter * -ResultSetSize40-Properties mail | Select-Object-Property Name, mail, SID
Paragraph -Style Heading1 "AD User Liste"
# generate a table with one line per user $user | # select the properties to display, and the header texts to use Table -Columns Name, mail, SID -Headers'Employee','Email','SID'-Width0