So let's get on with the command:
axmodel | select modelid, name, layer, version, elementcount | ` sort modelid | ConvertTo-Html -CssUri http://skaue.com/ps.css | Out-File c:\models.html
I'm not specifying the modelstore here, just grabbing whatever my local config is pointing too. I'm also making use of the default verb, so I can write "axmodel" instead of "get-axmodel". Nifty, ey?
I'm a former web developer, so I uploaded a small stylesheet to prettify my table. Feel free to grab it and reuse it if you want to, or simply reuse the URL.
body{background-color:#efefef; font-family:tahoma;font-size:90%;} table{border: 1px solid #999;} th{border-bottom:1px solid #999; text-align:left;} td{padding:2px;} tr:nth-child(odd) { background-color:#eee;} tr:nth-child(even) { background-color:#fff;}
And here is the result:
PowerShell + AX + Web development - fun, fun, fun!
No comments:
Post a Comment