locked
Strange issue with Powershell and SMlets RRS feed

  • Question

  • I know SMlets is not MS supported, just looking to see if anyone has run into this....

    After my shell loads, it has an entry for the $SMdefaultcomputer set in the $PROFILE.

    Upon initial load, the variable is set correctly, but once I try to run a command, something is changing it.

     Windows PowerShell
    Copyright (C) 2012 Microsoft Corporation. All rights reserved.
    
    PS C:\PS1> $smdefaultcomputer
    SCSM01
    PS C:\PS1> $smdefaultcomputer
    SCSM01
    PS C:\PS1> Get-SCSMClass -name system.workitem.changerequest$
    Get-SCSMClass : The Data Access service is either not running or not yet initialized. Check the event log for more information.
    At line:1 char:1
    + Get-SCSMClass -name system.workitem.changerequest$
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (localhost:String) [Get-SCSMClass], ServiceNotRunningException
        + FullyQualifiedErrorId : GenericMessage,SMLets.GetSMClassCommand
    
    PS C:\PS1> $smdefaultcomputer
    SCSM02
    PS C:\PS1>
    

    Any ideas on what could be changing the variable?


    Joshua Fuente

    Monday, March 31, 2014 6:04 PM