Thursday 17 July 2014

Error on Powershell - 0xffff0000

I am not very familiar with PowerShell, yet... really. Currently, my main scripting language is VBScript. However, I am truly believe the needs to learn PowerShell is keep increasing every single day. Server 2008 and Server 2012 are equiped with PowerShell, some advanced managements in XenDesktop 7.5 are using PowerShell, it is fun to learn PowerShell (they said), and a few other points mentioned by my colleagues (Wow, what on earth Heiry, why your introduction is longer than an episode of Dads?)

Issues :

Error encountered when a scheduled task created to run PowerShell script :


The shell cannot be started. A failure occurred during initialization: Object reference not set to an instance of an object.


Furthermore, this error reported on Task Scheduler.






Troubleshooting 
  1.  Go to Start > Run, and type regedit. Press Enter

  2.  Registry Editor launched. Browse to My Computer > HKEY_CURRENT_USER, and look for for Environment folder. It is not there.

  3.  Next, go to My Computer > right click and choose Properties

  4.  Go to Advanced tab, and click at Environment Variables...

  5.  You won't see any entry on variable, as below :


Resolution :

There are 2 methods to solve this :-


Method 01 - Using Registry Editor :

  1.  Launch REGEDIT. Browse to My Computer > right click at HKEY_CURRENT USER > hover at New > Choose Key

  2.  Change the new Key name to Environment

  3.  Now, lets refresh Registry Editor by pressing View > Refresh

  4.  We can see the new key is arranged accordingly.

  5.  Next, rignt click at Environment key > go to New > choose Expandable String Value

  6.  Right click at newly created strign entry, and choose Rename and name it as TMP

  7.  Right click at TMP string, and choose Modify

  8.  Configure below string to Value data box :
    String :
    %USERPROFILE%\Local Settings\Temp
                   
  9. Perform step 5 until 8 with below info : 
String Name : TEMP
Value Data : %USERPROFILE%\Local Settings\Temp




Method 02 - Using GUI :

  1. Right Click at My Computer > choose Properties > click at Advanced Tab > Click at Environment Variables

  2.  We will add the strings from here. Choose New

  3.  Configure the variable names and variable values accordingly, then press OK
     Variable name :
    TMP
     Variable Value : %USERPROFILE%\Local Settings\Temp

     Variable name : TEMP
     Variable Value : %USERPROFILE%\Local Settings\Temp
                                                                     
  4. This is the outcome. Press OK, and launch the PowerShell script to test.
Share:

Monday 14 July 2014

How To Generate Configuration Logging report - XenApp 5.0 for Server 2003

In previous post, i explained on how to enable Configuration Logging on XenApp 5.0 for Server 2003. In this post, I will explain on how to generate Configuration Logging report.


Description :
Generating Configuration Logging report  - XenApp 5.0 for Server 2003.


How To Do :


  1.  Firstly, login to workstation using the ID that has access to the DB. This Citrix blog explains well on the access required.
  2.  Launch Citrix Console, right click at Report Center > choose Generate Report

  3. Choose Configuration Logging Report, and press Next


  4.  If no specification being created yet, choose Create and use a new specification, press Next
  5.  Put the connection name, in this case the connection name is ConfigLogging. Click at Create
  6.   This window popped out, at Provider tab, choose Microsoft OLE DB Provider for SQL Server, and press Next >>
  7.  At Connection tab, properly specify the server name, credential, and the database. For credential (point #2 in the picture), choose Use Windows NT Integrated security (which is why I asked to login to the machine with that particular ID as step #1). Once all done, click at Test Connection.
  8.  If everything went well, this message will pop-up. Press OK.
  9.  We will be back to this screen, press OK.
  10.  Once we finished creating connection, we will be back to this screen. Press Next
  11.  Select the required farm, press Next
  12.  This screen will appear. Choose Use all available data, and press OK.
  13.  Customize the time accordingly, and press Next
  14.  Publish the report by choosing Publish report option, and specify the location by pressing the Add button. Once done, press Next
  15.  It is always best to save the specification, so we can easily generate the report again later on. Give the specification a name, and press Next
  16.  Everything will be summarize here, press Next.
  17.  All done. You may refer to Job view within Report Center node to check the progress.
Share:

Friday 11 July 2014

Info! Microsoft is Giving Away free eBook!

Microsoft is currently giving away free eBooks from their store, including: Windows 8.1, Windows 8, PowerShell, Server 2012, Exchange, Lync, etc etc.

From what they said, they already surpassed 1 millions downloaded copies, in just 2 days! Which equivalent to 347 copies in a second!

Dont forget to grab your copies from here!



Reference : http://blogs.msdn.com/b/mssmallbiz/archive/2014/07/07/largest-collection-of-free-microsoft-ebooks-ever-including-windows-8-1-windows-8-windows-7-office-2013-office-365-office-2010-sharepoint-2013-dynamics-crm-powershell-exchange-server-lync-2013-system-center-azure-cloud-sql.aspx
Share:

Thursday 10 July 2014

Task Scheduler Error - An Error has occurred for task . The following error was reported: A specific logon session does not exist. It may already have been terminated.

A few days ago I created a script to do some little, tiny checking on my servers. My plan was to create a Task Scheduler so that script can be executed periodically. But (yeah, there is always a but), I encountered an error. If we look carefully at the error, it did not mentioned about Securty or policy setting, but I know it must related to UAC.



Issues :

Receive error when configuring Task Scheduler :


An Error has occurred for task <Task Name>. The following error was reported: A specific logon session does not exist. It may already have been terminated.





Troubleshooting 
  1.  Go to Start > Administrative Tools > Click at Task Scheduler

  2.  Browse to Task Scheduler (local) > Task Scheduler Library

  3.  Right click at the specific Task Scheduler > choose Properties

  4.  At General tab, the radio box " Run whether user is logged on or not " is enabled. Which means, the setting is okay.

  5.  Further checking, go to Start > Run, type secpol.msc and press Enter.

  6.  Browse to Security Settings > Local Policies > Security Options

  7.  Check on this setting, it is Enabled.




Resolution :
  1.  Right click at the above mentioned setting, and choose Properties

  2.  Click at Disabled, press Apply and OK.


  3.  Perform gpupdate /force to refresh policy update.
Share:

Monday 7 July 2014

How To Sysprep Windows Server 2003

This maybe one of my last posts for Windows Server 2003, as we all know its EOL is on July 2015 (14th of July, 2015 to be exact). This post may become handy to some, may not to the others, as they already moved to Windows Server 2008, or perhaps Server 2012.


Description :
How To Sysprep Windows Server 2003.


How To Do :
  1.  Mount the Windows Server 2003 installer (take note on the version). Once done, browse to Support\Tools folder. Double click at DEPLOY.CAB

  2. Highlight all files, right click, and choose Extract.


  3. Select a destination. In this case, it is C:\Sysprep.


  4. Once done, you will see all these files inside the folder.



  5.  Double click at sysprep.exe

  6. This screen will pop up. Press OK.


  7. Based on your preference, choose all needed options accordingly. If you want to customize the installation using INI file, choose Factory, or else Reseal.


  8. For this post, I chose Reseal, and wants Sysprep to regenerate security identifier (SID). Hence, this message pop up. Choose OK.
Share:

Thursday 3 July 2014

How To View Pictures in Thumbnail

Last week was my first day in my new company (yes, I resigned from my previous company as I wanted to get new challenges). So, during my first day, we (my boss, another colleague and I) went out to buy new laptop for me (BYOD concept - so we can choose our own laptop, thanks boss!). So long story short, today I just realized that I can't view my pictures in thumbnail. Not a big deal though, but the feature is there, so why not using it, right? :D


Description :
Pictures showing as icon, rather than thumbnail.





 How To Do :


  1. Open Window Explorer, go to View tab, and click at Option



Share: