I am unclear what the benefits of snippets are, but I was going to publish a script I wrote to TechNet. I finish all the entries and the page tells me: A contribution to the TechNet Script Center Repository must contain a code snippet. Is the PowerShell code not enough? I tried creating snippets in ISE but seems more work than necessary.
Here is the code I put which isn't much at all:
$computers = "<TextFileListofComputerToRunViaPoSh.txt>"
$ADComp = "<OutputFileLocation.txt/.Log>"
Get-Content $computers | Foreach {If (Get-ADComputer -Filter {Name -eq $_}) {Add-Content $ADComp "$_ is Enabled $((Get-ADComputer $_).enabled) in Active Directory."} Else {Add-Content $ADComp "Warning!! $_ is not in Active Directory."}}
I noticed there was an insert code section and copying code there allowed me to save and publish my code.