How to use the smlets from IIS7.5 on it?

May 23, 2013 at 9:25 AM
Edited May 23, 2013 at 9:26 AM
Due to the post using the Google language translation, I might be English meaning can not be read.

I'm using the SCSM2012 SP1, but thought that can not be satisfied portal (SSP), to make the web portal on its own, we have the work.

Work that was done
  1. I installed smlets SM and console to the IIS server that is different from the SCSM Management Server.
  2. The handler mapping of IIS "asterisk. Ps1" and register the [~ ~ \ powershell.exe-File "% s"]
  3. Change the service account of SCSM the IIS anonymous user
  4. In the profile of the IIS server powershell I added the "Import-Module smlets".
However,
test.ps1 that was placed in the wwwroot in does not work.
If there is any advice, please let me know.

== test.ps1 ==
echo "Conten-Type: text / html"
echo ""
echo "<html>"
echo "<head>"
echo "<title> PowerShell </ title>"
echo "</ head>"
echo "<body>"
pwd
Import-Module smlets
Get-SCSMCommand
echo "</ body>"

echo "</ html>"

↑ to work when you change to [pwd] the [Get-SCSMCommand].
Output "Path ---- C: \ inetpub \ wwwroot".

it works on windows powershell, when you run this test.ps1.

Error message of Import-Module smlets of IE on

Import-Module: module file for a valid module directory is not found, the module 'smlets' that was specified was not loaded. Place of occurrence C: \ inetpub \ wwwroot \ ps \ test.ps1: 9 characters: 14 + Import-Module <<<< smlets + CategoryInfo: ResourceUnavailable: (smlets: String) [Import-Module], FileNotFoundException + FullyQualifiedErrorId: Modules_ModuleNotFound, Microsoft.PowerShell.Commands.ImportModuleCommand

Error message of Get-SCSMCommand of IE on
The term 'Get-SCSMCommand' is not recognized as the name of the program operable cmdlet, function, or script file. Make sure that the path is correct, please try again if you make sure that the name is written correctly, the path is included. Place of occurrence C: \ inetpub \ wwwroot \ ps \ test.ps1: 10 character: 16 + Get-SCSMCommand <<<< + CategoryInfo: ObjectNotFound: (Get-SCSMCommand: String) [], CommandNotFoundException + FullyQualifiedErrorId: CommandNotFoundException
May 23, 2013 at 9:47 AM
Edited May 23, 2013 at 9:48 AM
I solved this problem.
I was able to run When you have changed as under the contents of test.ps1.
echo "Conten-Type: text / html"
echo ""
echo "<html>"
echo "<head>"
echo "<title> PowerShell </ title>"
echo "</ head>"
echo "<body>"
Import-Module-Name "C: \ Program Files \ Common Files \ SMLets"
Get-SCSMClass-ComputerName <My Server Name>
echo "</ body>"
echo "</ html>"

Now, I turn now to work to make the web portal to replace the SSP now