Monday, January 31, 2022

IIS Windows Authentication 0xC000005E

IIS Windows Authentication 0xC000005E

Application is using IIS as the login portal, for internal users can login using 'Windows Authentication' and external users login using 'Form Based' authentication. Users from several domains are able to login, however every once in a while users connecting to the internal website are unable to authenticate themselves using 'Windows Authentication'. A temporary fix is to turn of 'Windows Authentication' and turn on 'Form Based' authentication'. 

The following event is logged in the eventvwr on the IIS server: 0xC000005E = STATUS_NO_LOGON_SERVERS 

The strange thing is users from the same domain in which the IIS server is configured are able to login, users from other domains are not able to login, even with the correct username and password. However with form based authentication they're able to login. 

DCDiag didn't return, also used Wireshark, but didn't see anything strange happening (Not an expert). Also NSLookup didn't return any errors and was able to ping the DC. Turned on Failed Request Tracing and didn't return anything specific except 401.2 not authorized message.

The application is using NTLM for authentication.

Don't have a clue to why this is happening? And why is the event logged on the IIS server and not on the client (No logon servers)? The user should authenticate against a DC right and the webserver shouldn't forward the request?

I'm trying to understand how the authentication process works so i can create a baseline (Wireshark trace) in case if it stops working again. 




  • Edited by Marc-1983 Monday, August 10, 2015 2:08 PM
  • Changed type Alex Lv Monday, August 17, 2015 4:53 AM

Reply:
Seek help from IIS forums :http://forums.iis.net/

Regards, Ravikumar P


------------------------------------

Remove or Disable the Start Menu Search box in Windows 2008 Server

Is there a way to remove or disable the Start Menu Search box in Windows 2008 Server for a specific user?

Reply:

Hi,

It seems that there is no such group policy exists:

Group Policy Settings for Start Menu and Taskbar

http://technet.microsoft.com/en-us/library/ee617162(WS.10).aspx

A menthod is to turn off Windows Search like this:

http://www.howtogeek.com/howto/10246/how-to-disable-search-in-windows-7/

However it will affect all users so it is not the thing you are trying to find.


Shaon Shan| TechNet Subscriber Support in forum| If you have any feedback on our support, please contact tngfb@microsoft.com

------------------------------------
Reply:

sorry to drag this up again.. I need a way to remove the search box from a group of machines (don't want to remove the feature by logging on locally, I want to deploy the change using CM).

Anyone know where in the registry the setting is held? Shocked there's no GPO for it!

Cheers


------------------------------------
Reply:

Possible workaround (only tested briefly on 2008R2 in a locked down RDS enviornment, using a non-admin account)

Enabling these three policies leaves the search bar in place, but it also seems to have effectively disabled most of its functionality. Anything i type into the search box (including desktop, cmd, google, www.google.com, etc) now returns "No items match your search"

  User Configuration > Administrative Templates > Start Menu and Taskbar > Do not search for files

  User Configuration > Administrative Templates > Start Menu and Taskbar > Do not search Internet

  User Configuration > Administrative Templates > Start Menu and Taskbar > Do not search programs and Control Panel items

I have dozens of other policies in place, but I believe these three are what ultimately did the trick.

YRMV :)

 

 


------------------------------------
Reply:
I have enabled those 3 setting above but you can still get to windows explorer by typing a single \

------------------------------------
Reply:

Has anyone figured out a way through group policy or registry hack to remove the search box from the start menu for a 2008 r2?

thanks


------------------------------------
Reply:
> Has anyone figured out a way through group policy or registry hack to
> remove the search box from the start menu for a 2008 r2?
>
>
 
Why on earth???
 

NO THEY ARE NOT EVIL, if you know what you are doing: Good or bad GPOs?
Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!

------------------------------------
Reply:

Try this open source Start Menu - it solved many of the issues we were experiencing with the generic W2K8 Start Menu and gives you the option to remove the search box... and can be easily managed via GPO Preferences Registry settings.

http://classicshell.sourceforge.net/


------------------------------------
Reply:
I have enabled those 3 setting above but you can still get to windows explorer by typing a single \

Probably a bit late for your purposes, but the ability to enter a single '\' and list the contents of the C: drive has to do with the Search Bar's ability to function as a 'Run' command.  If you disable that, it will no longer work.  That setting is here:

  User Configuration > Administrative Templates > Start Menu and Taskbar > Remove Run menu from Start Menu


------------------------------------
Reply:
This does not work. The user can still type "\" and access the C drive

------------------------------------

Windows10 compatible with Windows Home Server 2011?

any known issues with a W10 client on WHS2011....currently running W7 with WHS 2011 flawlessly...upgraded W7 client to W10...10 blew out the WHS2011 client access file...client could still see/access network but WHS2011 software (automatic backup functions and file restore functions were doa)... WHS 2011 saw the W10 client as offline... 'bout never got the client machine back  online to be able to restore to the previous days W7 configuration..used W10 roll back feature... worked well but WHS2011 access was gone....does anyone know if Windows 10 is compatible with Windows Home Server 2011???

Not able to select applications from the Windows Store in SCCM to deploy via Intune

Hi All

Had an issue where I could not select applications from the Windows Phone store to add to SCCM for deployment over Intune. After a while scratching my head I found a hotfix. The files are dated 31/07 so pretty recent. If you have this issue check out

https://support.microsoft.com/en-us/kb/3081699

Just installed it and it sorted the problem for me.


Reply:

Be a little careful with this. There are two hotfixes:

- Pre-CU1

-Post-CU1 (only released today)

You MUST use the correct one.



Gerry Hampson | Blog: www.gerryhampsoncm.blogspot.ie | LinkedIn: Gerry Hampson | Twitter: @gerryhampson


------------------------------------

Exchange 2013 CU6 installation hangs on step 9: Languages

Just had Exchange 2013 CU6 update hang on Step 9 of 18: Languages.  It was stuck at 0% for almost an hour.  I was able to get it moving forward by disabling SCEP 2012 by killing the process and deselecting check certificate for server certificate revocation in IE.  Both steps were taken nearly simultaneously and the install process for Exchange jumped up immediately. Both steps were taken based on info from:

https://social.technet.microsoft.com/Forums/exchange/en-US/2a346a37-d092-4189-8a07-e8a9971925f1/cu2-installation-hangs-on-step-9-languages?forum=exchangesvrdeploy

and

https://social.technet.microsoft.com/Forums/exchange/en-US/0975bb5e-f270-4e39-abf3-70809cd98161/exchange-2010-sp3-installation-hangs-language-pack-hell

Just wanted to post that this issue was encountered on CU6 as well.  Has anyone had a similar experience or able to tell which of these two steps (or both) is actually needed?


Reply:

Hello,

Thanks a lot for sharing, saved my day!

Cheers:)


------------------------------------
Reply:

Captain taioahgikdaihoaldndy

you are my saviour. There you go 1 million likes for you.


------------------------------------

Windows 10

Since installing Windows 10 I am unable to Shut Down, if I click on Shut Down it looks like it's going to Shut Down but then goes back to Log In and the Password prompt.
  • Moved by Olaf Engelke Monday, August 10, 2015 2:06 PM Not a Windows Home Server topic

Reply:

What happens if you open a command prompt as administrator and enter the command

shutdown /s /t 0

What happens if you press the power button on your PC? (Configure power switch behavior in Energy Options in Settings/System/Power & sleep/Additional power settings to Shutdown, if necessary.)

Best greetings from Germany
Olaf


------------------------------------

INTERNET// CUSTOMIZE// UNRESPONSIVE !!!!

My internet isn't connecting as my internet access isn't in the taskbar

i have tried everything, when i right click and go on customize it's unresponsive so i can't go on that.

When i go on network and sharing there's a big red X in between my computer and the internet i have pressed the big red X and it does the Diagnostics and says 'Troubleshooting couldn't identify the problem'?

On my other laptop my internet is working fine, the internet option in my taskbar is working fine but not on my computer.

Workgroup workstation can't resolve name for domain joined server, RDP only by IP address

I have a test environment that includes a hyperv host with a mix of Server 2012 R2 and 2008 R2 VMs all of which are joined to my domain.

I am having trouble RDPing into the 2008 R2 systems from a workgroup workstation. The 2012 R2s are not an issue.

Here's the specifics:

Workstation is pointing to my DNS servers for IPV4 (IPV6 is disabled on all systems)

RDP works with the IP but not the name (no name resolution)

If I disable the firewall on the 2008 R2 systems everything works. (Odd because I assume if this is a firewall issue I would'nt be able to RDP via IP either)

Any suggestions?



Reply:

Hello Crismo16,

Does your DHCP setting on the network have the Primary DNS suffix of your domain or are you manually setting up your ip addresses for the workgroup machines.

Check if the names resolve using nslookup before disabling the Windows Firewall if not then you need to add an exception for DNS lookup connections (tcp/udp) on port 53 (dns).


------------------------------------
Reply:

Thanks for the response. I'm just using a SOHO router for DHCP. I have set the IP statically however but same result. I tried nslookup and no luck. I've also opened DNS ports in the firewall.



------------------------------------
Reply:

Hi,

Workstation is pointing to my DNS servers for IPV4 (IPV6 is disabled on all systems)

Please keep IPv6 enabled.

If I disable the firewall on the 2008 R2 systems everything works

If these Windows Server 2008 R2 systems are DNS servers, then it makes sense.

Since this issue is more related to Network, please refer to Network Infrastructure Server forum below to get further assistance:

https://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverNIS

Best Regards,

Amy


Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


------------------------------------

XPS to PDF issues using Microsoft Remote Desktop for Mac

Microsoft Desktop for Mac 8.0.18

Windows Server 2008 R2 

-All remote desktop services components installed

-XPS Document Writer installed

OS X 10.9.2 Client

Issue: When connecting to a RemoteApp resource I am able to "print to PDF" through the application's menu. While logged in to a non-administrative user the XPS file will briefly show up on the OS X client desktop but never makes it to PDF form. Confirmed with a second program that uses XPS to write PDF files 

This leads me to believe it is a permissions error somewhere in the remote desktop services host. 

Any ideas?


Reply:

Hi,

So XPS to PDF will work with RemoteApp but not Remote Desktop Client.

Are you using a same user profile in connecting with RemoteApp and RDC?

Also can you do the XPS to PDF with remoting from a Windows system instead of iOS?


Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


------------------------------------

Remote Blob Storage will not solve the problem of growing Content DB, right?

Hello, guys!

I have a web application with 2 site collections stored in a single Content Database. Recently I have noticed, that Content DB size have grown up to 100 GB and kept growing (now it is around 130GB). After some analysis I have found out, that we got a huge document library around 70GB at one of the subsites. So, being afraid of Content DB growing up to unsupported limit of 200GB, I decided to move all the binaries from Content DB to the Remote Blob Storage, but today I have noticed the following phrase at Software Boundaries and Limits whitepaper (https://technet.microsoft.com/en-us/library/cc262787.aspx): "If you are using Remote BLOB Storage (RBS), the total volume of remote BLOB storage and metadata in the content database must not exceed the 200GB limit."

Does it really mean, that my problem will not be solved this way?..

Are there any others opportunities to keep the Content DB from growth without restricting users to upload their documents?

Best regards,

Anton.


Reply:

If the users are uploading their documents, they must be saved somewhere. So content DB size will have to grow. What you can do, is to design strategies around to limit the size of the content database within 200GB.

1. You have two site collections within same DB. You can choose to move one of the site collection to new content database.

2. You can also choose to apply quota template restricting the maximum size of the content database.

3. Since one document library itself is of 70GB, you can move that site into its own site collection and have that site collection in another content database.

4. You should also communicate to end users effectively using document libraries and ask them to upload documents in different libraries.

5. You can also choose to ask users to use different document library/site for archival purposes. Its hard to say that they are using all documents for collaboration purposes actively.

Also supported size limit of content database has grown to 4 TB. But 200 GB limit is for best performance scenarios.

Hope this helps.


Thanks Mohit


------------------------------------
Reply:

Hi Martynenko

Can you please let us know if your query is resolved or you want to have more discussion on it.


Thanks Mohit


------------------------------------
Reply:

RBS still counts against Content Database size, so you're correct, it will not resolve the overall size 'limits' of CDBs.

That said, general purpose (think Team sites) Content Databases can go as high as 4TB without guidance from Microsoft. All you must meet is a minimum of 0.25 IOPS/GB, preferably 2 IOPS/GB. See: https://technet.microsoft.com/en-us/library/cc262787.aspx

130GB is fairly small. 200GB+ is definitely supported by Microsoft.


Trevor Seward

        

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


------------------------------------
Reply:

Yes, thanks!

You have clarified the question to me. Now its clear.


------------------------------------

When is necesary include indexes and the type..

Hi

Exist a web page from technet, that return for example: use indexes in order by, group by, top, etc...

With Indexes clustered, nonclustered, etc.

  • Changed type pituachMVP Thursday, July 21, 2016 10:18 AM The question is very general, and the OP does not return to check responses. It seems like a better as discussion at this point

Reply:

Hi

Exist a web page from technet, that return for example: use indexes in order by, group by, top, etc...

With Indexes clustered, nonclustered, etc.

What are you trying to ask ? Your question does not makes sense

Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

My Technet Wiki Article

MVP


------------------------------------
Reply:
It is very open-ended question, do you have specific example? I would not go for generalization on this statement

Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting: Large scale of database and data cleansing
Remote DBA Services: Improves MS SQL Database Performance
SQL Server Integration Services: Business Intelligence


------------------------------------

PSCustomObject question on creation and behavior in ForEach loop

Please help me understand how this PSCustomObject is getting created, and why it has the (good) behavior it has in the following ForEach loop. After the line executes that populates $Computerobj, I see that this variable is of now of type PSCustomObject. Please explain what is occurring in this line. What is the principle of using 'Select-object' when there are no properties to select at this point?

Also, during each iteration of the ForEach, the PSCustomObject is populated with one-each of Name, Uptime and LastReboot. However; at the point the object/variable $ComputerObj is 'output' to the screen (last line of foreach), it only outputs the 'headings' ONCE, followed by just the dataset for each computer. How does PS know to do this?

$computers = Get-Content c:\temp\computers.txt
}
foreach ($computer in $computers){
 $Computerobj = "" | select ComputerName, Uptime, LastReboot
 $wmi = Get-WmiObject -ComputerName $computer -Query "SELECT LastBootUpTime FROM Win32_OperatingSystem"
 $now = Get-Date
 $boottime = $wmi.ConvertToDateTime($wmi.LastBootUpTime)
 $uptime = $now - $boottime
 $d =$uptime.days
 $h =$uptime.hours
 $m =$uptime.Minutes
 $s = $uptime.Seconds
 $Computerobj.ComputerName = $computer
 $Computerobj.Uptime = "$d Days $h Hours $m Min $s Sec"
 $Computerobj.LastReboot = $boottime
 $Computerobj
}

OUTPUT

ComputerName     Uptime                           LastReboot                        
------------      ------                          ----------                        
cm-flor-apvm091  47 Days 13 Hours 47 Min 17 Sec   6/18/2015 8:41:39 PM              
sm-nckm-apvm055  0 Days 0 Hours 12 Min 2 Sec      8/5/2015 10:17:05 AM              


Tony Auby

  • Changed type Bill_Stewart Wednesday, November 4, 2015 7:53 PM

Reply:

Let us do this in a modern way and not in old PS 1 syntax:

$now = Get-Date  Get-Content c:\temp\computers.txt |   ForEach-Object{   		Get-WmiObject Win32_OperatingSystem -ComputerName $_   	} |   	select PsComputerName,   			@{N='LastBootTime';E={$_.ConvertToDateTime($_.LastBootUpTime)}},   			@{N='UpTime';E={$now - $_.ConvertToDateTime($_.LastBootUpTime)}}
Now  you don't have to deal with those unknown and pesky objects.


\_(ツ)_/


  • Edited by jrv Wednesday, August 5, 2015 6:02 PM

------------------------------------
Reply:

Hi Tony,

Good to see that you are trying to learn PowerShell.

Q1. What is the principle of using 'Select-object' when there are no properties to select at this point?

A. You could say its another way of creating a PSObject in the fly. Whenever you use Select and mistype the parameter name it doesn't give you an error, but instead creates a custom 'NoteProperty' for you.

This is something similar to when you use Calculated Properties or Custom Property etc. That has many usages.

PS > Get-Process powershell | Select Tony,Auby | Get-Member       TypeName: Selected.System.Diagnostics.Process    Name MemberType Definition  ---- ---------- ----------  Equals Method bool Equals(System.Object obj)  GetHashCode Method int GetHashCode()  GetType Method type GetType()  ToString Method string ToString()  Auby NoteProperty Auby=null  Tony NoteProperty Tony=null    PS > Get-Process powershell | Select Tony,Auby, @{n='Me';e={"Hello"}} | gm       TypeName: Selected.System.Diagnostics.Process    Name MemberType Definition  ---- ---------- ----------  Equals Method bool Equals(System.Object obj)  GetHashCode Method int GetHashCode()  GetType Method type GetType()  ToString Method string ToString()  Auby NoteProperty Auby=null  Me NoteProperty System.String Me=Hello  Tony NoteProperty Tony=null

You by now must have noticed that the expression before the pipe has little to do if you are not calling anything that its returning, using "" blank string is the easiest way to get a single value passed.

Try these:

Get-Process c* | Select Tony,Auby, @{n='Me';e={"Hello"}}

 "" | Select Tony,Auby, @{n='Me';e={"Hello"}}

Here are some preferable methods to create PSObjects

Windows PowerShell: The Many Ways to a Custom Object:

https://technet.microsoft.com/en-us/magazine/hh750381.aspx

Q2.  it only outputs the 'headings' ONCE, followed by just the dataset for each computer. How does PS know to do this?

A. Its difficult to answer how it does it, basically it trys to guess based on some logic.But formatting is not always as expected, if you have multiple output types or PSObjects to show.

This article PowerShell Basics: Formatting does a good explaination on it. 

Best way is the manually specify how and what you want. Simple way is to use

 $Computerobj | Format-Table

Try out the following code, with and without '| ft' to understand more.

$Computerobj1 = "" | select ComputerName1, Uptime, LastReboot1   $Computerobj1.ComputerName1 = "Comp"   $Computerobj1.Uptime = "200"   $Computerobj1.LastReboot1 = get-date   $Computerobj1   #$Computerobj1 | ft    $computers = "a","b","c"  "Hello"  "Bing1"  "Bing2"        foreach ($computer in $computers){   $Computerobj = "" | select ComputerName, Uptime, LastReboot   $Computerobj.ComputerName = $computer   $Computerobj.Uptime = "100"   $Computerobj.LastReboot = get-date   $Computerobj   #$Computerobj | ft   }   "Bing3"    ComputerName1 Uptime LastReboot1   ------------- ------ -----------   Comp 200 8/7/2015 5:32:45 PM   Hello  Bing1  Bing2   100    100    100   Bing3


You would notice that, it only takes the first object 'headings'  ONCE and ignores the valid values later. If type doesn't fit in, fits the type undefined ones to the first matching value

Check out the MicrosoftVirtualAcademy PowerShell Jumpstarts Videos, it should clearout most of your doubts and give you a good headstart.


Regards,

Satyajit

Please"Vote As Helpful" if you find my contribution useful or "MarkAs Answer" if it does answer your question. That will encourage me - and others - to take time out to help you.



  • Edited by Satyajit321 Friday, August 7, 2015 12:05 PM

------------------------------------
Reply:

Let us do this in a modern way and not in old PS 1 syntax:

$now = Get-Date  Get-Content c:\temp\computers.txt |   ForEach-Object{   		Get-WmiObject Win32_OperatingSystem -ComputerName $_   	} |   	select PsComputerName,   			@{N='LastBootTime';E={$_.ConvertToDateTime($_.LastBootUpTime)}},   			@{N='UpTime';E={$now - $_.ConvertToDateTime($_.LastBootUpTime)}}
Now  you don't have to deal with those unknown and pesky objects.


\_(ツ)_/


As long as we're making appeals to modernity:

$now = Get-Date  Get-Content c:\temp\computers.txt |   ForEach-Object{   Get-CimInstance Win32_OperatingSystem -ComputerName $_ |   select CSName,LastBootUpTime,   @{l='Uptime';e={$now -$_.LastBootUpTime}}   } 


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

You should almost always place data manipulation outside of the loop:

$now = Get-Date  Get-Content c:\temp\computers.txt |   ForEach-Object{   Get-CimInstance Win32_OperatingSystem -ComputerName    } |   select CSName,LastBootUpTime,   @{l='Uptime';e={$now - $_.LastBootUpTime}}   

An even better shorthand:
$now = Get-Date  Get-CimInstance Win32_OperatingSystem -ComputerName (Get-Content c:\temp\computers.txt) |   select CSName,LastBootUpTime,@{l='Uptime';e={$now -$_.LastBootUpTime}}   


\_(ツ)_/



  • Edited by jrv Friday, August 7, 2015 3:42 PM

------------------------------------
Reply:
Always figured you should do your Select early and get the extraneous data out of the pipeline.

[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

It does not remove it from the pipeline as you think but causes a pipeline to be executed one for every instance and then passed into the outer pipeline.  Measure it and you will see a difference.

If you want to reduce data then do this:

$now = Get-Date  Get-Content c:\temp\computers.txt |   ForEach-Object{   Get-CimInstance Win32_OperatingSystem -ComputerName $_ -Property CSName,LastBootUpTime   } |   select CSName,LastBootUpTime,   @{l='Uptime';e={$now - $_.LastBootUpTime}}  


OR

$now = Get-Date  Get-CimInstance Win32_OperatingSystem -ComputerName (Get-Content c:\temp\computers.txt) -Property CSName,LastBootupTime|   select CSName,LastBootUpTime,@{l='Uptime';e={$now -$_.LastBootUpTime}}   

That reduces data over the network and in the pipeline.  THe data formatting and calculation stage is separated as it should be. 

I agree that sometimes we mightgain but , in general, the objects in the pipeline do not slow things down..  They are not passed directly but as references so there should normally be little or no loss.


\_(ツ)_/


------------------------------------
Reply:
Wasn't considering it a speed issue as much as a memory management practice.  Don't collect a bunch of stuff you're not going to use.

[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

But it is already collected.  The memory manager will not help until the pipeline is ended.  Why waste time on something that really doesn't help.  If you have some strange requirement then this may be something to look at but don't make it a default design pattern.

Best Procatice for scripting. Use native methods so as to take advantage of all future improvements.

Example:

WMF 5 has now added significant improvements to COM activation.  Those who may have imp[lamented questionable methods to optimize will not be able to take advantage of the WMF upgrade.

Scripting I not application programming.  It is a utility.  Forcing it to do too much defeats the purpose of having a script.  If we need more sophistication we should move to C# or C++ or other lower level language.


\_(ツ)_/


------------------------------------
Reply:

Scripting I not application programming.  It is a utility.  Forcing it to do too much defeats the purpose of having a script.  

Okay.  What did I force it to do that wasn't going to be done anyway?


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

You are inventing a tuning rule that is not needed.  The design pattern should be to place all data selection at the end of the pipeline.  Placing it in the loop seldom creates more efficiency.  As WMF become more optimized predictable design patterns will be better positioned to take advantage of the improvements.

I am not saying "never".  I am saying don't let superstition complicate a script.  Using the-Property argument of a CmdLet selects the properties at the source.  Using a select just adds extra work and does not save memory as the objects have already been created.


\_(ツ)_/


------------------------------------
Reply:

You are inventing a tuning rule that is not needed.  The design pattern should be to place all data selection at the end of the pipeline.  Placing it in the loop seldom creates more efficiency.  As WMF become more optimized predictable design patterns will be better positioned to take advantage of the improvements.

I am not saying "never".  I am saying don't let superstition complicate a script.  Using the-Property argument of a CmdLet selects the properties at the source.  Using a select just adds extra work and does not save memory as the objects have already been created.


\_(ツ)_/

Right now, I'm not really seeing any reason given why one pattern is "inventing a tuning rule", and the other is simply what "should be".  Throwing pejoratives like "superstition" is not an argument.

[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

By "superstition" I am referring to the assumption that it somehow improves the script.

I am not saying is is wrong or not to use it.  It is just unnecessary and makes long term maintenance a bit more of an issue.  NOt so much in this simple case but in more complex cases.


\_(ツ)_/


------------------------------------
Reply:

Seems more of a disagreement over style than substance.

 IMHO, exploring the reasons for using CIM vs WMI would have been a lot more valuable.


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:
Not style.  It has a real impact.

\_(ツ)_/


------------------------------------
Reply:

I ran this:

$dcs = Get-ADDomain | select -ExpandProperty ReplicaDirectoryServers  $now = Get-Date    (measure-command {  $dcs |   ForEach-Object{   Get-CimInstance Win32_OperatingSystem -ComputerName $_ -Property CSName,LastBootUpTime |   select CSName,LastBootUpTime,   @{l='Uptime';e={$now - $_.LastBootUpTime}}   }    }).totalseconds    (measure-command {  $dcs |   ForEach-Object{   Get-CimInstance Win32_OperatingSystem -ComputerName $_ -Property CSName,LastBootUpTime    }|   select CSName,LastBootUpTime,   @{l='Uptime';e={$now - $_.LastBootUpTime}}   }).totalseconds  
multiple times, and can't find any appreciable difference.  Either one will finish marginally faster than the other about half the time.


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

Clearly we are arguing completely different things.  Lets put it aside until a good example arrives.

For such a simple example we will not get an answer that will illustrate what I am referencing.


\_(ツ)_/


------------------------------------
Reply:

Okay.

Those two examples are copied from the script I originally posted, and from the counter example you provided.  The only thing I modified was the source of the server list.


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


------------------------------------
Reply:

Hi Tony,

Any updates.


Regards,

Satyajit

Please "Vote As Helpful" if you find my contribution useful or "Mark As Answer" if it does answer your question. That will encourage me - and others - to take time out to help you.


------------------------------------

Receving error code 80070308.

I am using Win 7 ultimate sp1. Windows update has suddenly stop working.  I have tried the fixit app and manual download and install. Unable to resolve problem. Can anyone help?

Reply:

Please, run the Windows Update troubleshooter.

http://windows.microsoft.com/en-us/windows/troubleshoot-problems-installing-updates#1TC=windows-7

Hopefully, it helps.


------------------------------------

Quick settings brightness

In my opinion, quick settings brightness button should include 0%. Now it includes 25%-50%-75%-100%.

Reply:
Not sure that would work.  Doesn't the new settings work based upon the fact you set the percent and the system will automatically brighten plus or minus a certain percentage from what you set.  If you set it at zero it seems the range would already be diminished significantly.

------------------------------------

Font rendering on Windows 10

Hello I recently updated to Win10 from win Win7. (Sorry my english but I'm italian)

I noticed immediately the different font rendering from the metro apps (start menu, edge, settings..) and the classic Cleartype still present but only in standard desktop app (firefox, Windows livemail, iexplorer, and all other NOT created for metro interface).

From what I read Cleartype use colored subpixel antialias, while win10 Matro app uses monocrome antialias.

IMHO Cleartype is better for a standard desktop LCD monitor, because DPI (PPI) is not so high even on a full hd 24 inch. Cleartype render always better on my monitor.

It's not good to se a new OS with a not omogeneous font rendering. Many desktop users will notice this bad fonts.

Moreover I now prefer Firefox to Edge because of that ...

is it possible to force somewhere cleartype also for the Metro Apps ?

If not, it would be good to have an option with an update to do that ...

Thanks

Unable to connect Remote SQL server using SMO within WCF running under Local system account logon.

Hi ,

I have a WCF web service running under local system account(Log in user is Administrator). Within the server i am trying to login and get version of a remote SQL server, which is not working.But the same is working fine if the WCF web service is running under Administrator account.

Can any body answer me know why is this happening.


Reply:

Huh?

What account is used? Local System or Administrator?


------------------------------------

Solution for slow login and logout on a terminal server

Of course, this may not solve your particular problem, but if you check this out, you will be able to immediately tell if this is your problem.

I recently had a Terminal Server that when people logged in, it just about crippled the server, and it was also extremely slow to log out. It turns out that there can be thousands, or even hundreds of thousands, of HP keys in the following locations in a terminal server environment. They are dynamically added when users log in due to their local printers. Over time, they add up, and can cause great problems. So you can determine if you have the problem by just checking those locations.

HKEY_CURRENT_USER\Software\Hewlett-Packard
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\ Hewlett-Packard
HKEY_USERS\.DEFAULT\Software\ Hewlett-Packard

Even after deleting them, which can be done safely (if you have any doubts, export the key first, then test), eventually the problem will return, so here is my solution:

Create the following registry script in the C:\Windows\system32 directory and name it CleanupHP.reg

Windows Registry Editor Version 5.00

[-HKEY_USERS\.DEFAULT\Software\Hewlett-Packard]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\ Hewlett-Packard]

Create the following registry script in the C:\Windows\system32 directory and name it CleanupHP_User.reg

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Hewlett-Packard]

Then create the following batch file in the C:\Windows\system32 directory and name it CleanupHP.bat

regedit /s C:\ Windows\system32 \CleanupHP.reg

Create the following batch file in the C:\Windows\system32 directory and name it CleanupHP_User.bat

regedit /s C:\ Windows\system32 \CleanupHP_User.reg

Open gpedit.msc and go to Computer Configuration>Windows Settings>Scripts and add “C:\ Windows\system32 \CleanupHP.bat” to the shutdown scripts.

The go to User Configuration>Windows Settings>Scripts and add the second script C:\ Windows\system32 \CleanupHP_User.bat to the logoff scripts.


For more information: http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1302781474639+28353475&threadId=1247687


On Windows 2003 Server or Windows XP, you can install the User Profile Hive Cleanup Service to help close down sessions more quickly when you log out. It closes open file handles, remaps them to the default user, and runs as a service, set to automatic. It starts and stops itself as needed, but does not run continuously. It is not necessary on Server 2008 and Windows Vista and later as it has since been incorporated into the OS as the “User Profile Service”.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1b286e6d-8912-4e18-b570-42470e2f3582&displaylang=en (Note: The documentation correctly states that version 1.6d will not operate on 64-bit versions, but if you look closely, they are actually up to 1.6g as of this writing, which does support 64-bit.)

I have not yet tested this, but I am hoping that this is also why Microsoft and Windows updates may take so long.

All the best,

Kevin Cotreau

MCSE+I, MCNE

 


Reply:

Looking into slow application installations (all installations using msiexec.exe process) I found myself gazing at a couple off HP registry entries which where completely out of proportion. Its probably by design for the HP UPD to fill up those entries with all the uid for HP printer products, but come on HP, you make it that my servers crumble and feels like coming to a halt when I try to install the simplest of applications. Even so, printing is also a hasle! I've worked with HP printers for more then a decade now, but this UPD is a total F*cK*p! seriously HP, get your act together and right some descent printer drivers.

I stumbled on this post, which I found to be most helpfull and also comfirming that I am not alone who is facing this problem.

We all know printers are evil, but bad printers drivers are its mothers!

Cheers Kevin.


------------------------------------
Reply:

KCotreau,

You are right on target!

I found over 4700 entries under HKEY_USERS/.DEFAULT/SOFTWARE/HEWLETT PACKARD.

I exported a copy of the HEWLETT PACKARD folder and then deleted the folder all together. 

Installations and uninstalls were taking up to 3 hours.   After deleting this folder, less than 5 minutes.

Another cool tool from SysInternals was Process Monitor (free - http://technet.microsoft.com/en-us/sysinternals/bb896645).   I ran Process Monitor before removing the folders under HKEY_USERS/.DEFAULT/SOFTWARE/HEWLETT PACKARD. You can see MSIEXEC.EXE go crazy and constantly pointing to keys in HKEY_USERS/.DEFAULT/SOFTWARE/HEWLETT PACKARD.   I also used Perfmon and add an entry for msiexec.exe and it was running almost almost 100% Processor time.
Thank you.
-Bob

 


------------------------------------
Reply:

I have wrote two VBS scripts to delete only these garbage registry keys by using regular expression. First is designed to run under user account during logoff process and the second is designed to run under system account during shutdown procedure. There are:

reg_del_hp_keys_user.vbs

On Error Resume Next    Const HKEY_CURRENT_USER = &H80000001    strKeyPath = "HKCU\Software\Hewlett-Packard"  Set objRegExp = CreateObject("VBScript.RegExp")  objRegExp.Pattern = "^[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}$"  Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")    objReg.EnumKey HKEY_CURRENT_USER, Mid(strKeyPath, 6), arrSubKeys  For Each SubKey In arrSubKeys  	If objRegExp.Test(SubKey) = True Then intRes = DeleteRegistryKey(strKeyPath & "\" & SubKey)  Next    Set objReg = Nothing  Set objRegExp = Nothing      Function DeleteRegistryKey(parKey)  	DeleteRegistryKey = RecursiveRegKeyDelete(HKEY_CURRENT_USER, Mid(parKey, 6))  End Function    Function RecursiveRegKeyDelete(parRoot, parKey)  	Const con_READ_CONTROL				= 131072  	Const con_KeyDeletedSuccessfully	= 0  	Const con_KeyDoesNotExist			= 1  	Const con_AccessDenied				= 2  	Const con_SomeOtherError			= 3  	  	If objReg.CheckAccess(parRoot,parKey,con_READ_CONTROL) = 0 Then  		If objReg.EnumKey(parRoot, parKey, arrSubKeys) = 0 Then  			If Not IsNull(arrSubKeys) Then  				For i = 0 To UBound(arrSubKeys)  					RecursiveRegKeyDelete parRoot, parKey & "\" & arrSubKeys(i)  				Next  			End If  		End If  		  		intResult = objReg.DeleteKey(parRoot, parKey)  		If intResult = 0 Then   			RecursiveRegKeyDelete = con_KeyDeletedSuccessfully  		ElseIf intResult = 5 Then  			RecursiveRegKeyDelete = con_AccessDenied  		Else  			RecursiveRegKeyDelete = Con_SomeOtherError  		End If  	Else  		RecursiveRegKeyDelete = con_KeyDoesNotExist  	End If  End Function


reg_del_hp_keys_machine.vbs

On Error Resume Next    Const HKEY_USERS = &H80000003    strKeyPath = "HKEY_USERS\.DEFAULT\Software\Hewlett-Packard"  Set objRegExp = CreateObject("VBScript.RegExp")  objRegExp.Pattern = "^[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}$"  Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")    objReg.EnumKey HKEY_USERS, Mid(strKeyPath, 12), arrSubKeys  For Each SubKey In arrSubKeys  	If objRegExp.Test(SubKey) = True Then intRes = DeleteRegistryKey(strKeyPath & "\" & SubKey)  Next    Set objReg = Nothing  Set objRegExp = Nothing      Function DeleteRegistryKey(parKey)  	DeleteRegistryKey = RecursiveRegKeyDelete(HKEY_USERS, Mid(parKey, 12))  End Function    Function RecursiveRegKeyDelete(parRoot, parKey)  	Const con_READ_CONTROL				= 131072  	Const con_KeyDeletedSuccessfully	= 0  	Const con_KeyDoesNotExist			= 1  	Const con_AccessDenied				= 2  	Const con_SomeOtherError			= 3  	  	If objReg.CheckAccess(parRoot,parKey,con_READ_CONTROL) = 0 Then  		If objReg.EnumKey(parRoot, parKey, arrSubKeys) = 0 Then  			If Not IsNull(arrSubKeys) Then  				For i = 0 To UBound(arrSubKeys)  					RecursiveRegKeyDelete parRoot, parKey & "\" & arrSubKeys(i)  				Next  			End If  		End If  		  		intResult = objReg.DeleteKey(parRoot, parKey)  		If intResult = 0 Then   			RecursiveRegKeyDelete = con_KeyDeletedSuccessfully  		ElseIf intResult = 5 Then  			RecursiveRegKeyDelete = con_AccessDenied  		Else  			RecursiveRegKeyDelete = Con_SomeOtherError  		End If  	Else  		RecursiveRegKeyDelete = con_KeyDoesNotExist  	End If  End Function

Also I've wrote PS script to run via scheduled tasks on terminal server. In my environment it runs every week on Sunday. It does the same things as the second script above:

New-PSDrive -PSProvider Registry -Root HKEY_USERS -Name HKU  $RegistryKey = "HKU:\.DEFAULT\Software\Hewlett-Packard\"    $KeyOK = ls $RegistryKey -erroraction silentlycontinue  if (!$KeyOK) {   Write-Host "Registry key is not found."   return  }    foreach($SubKey in Get-ChildItem $RegistryKey) {  	$KeyPath = $SubKey.PsPath   if ($KeyPath -match "^.*\\[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}-[a-z0-9]{4,12}$") {  		Remove-Item -Path $KeyPath -Recurse  	}  }

Hope this will help anyone :)
  • Edited by sm4sh1k Sunday, August 9, 2015 3:32 PM

------------------------------------

Lync integration with Tech Tools

Hey There,

Has anyone done any type of lync integration with tech tools like Jira, Jenkins, Datadog etc? It's pretty easy to do integration using Hipchat or Slack but there doesn't seem to be anything straight forward with Lync......!

I could find one paid connector for Lync and Jira integration but I really want to know how to go about any third party (specifically tech tools) integration using Lync?

I'll appreciate if you could share your thoughts.

Regards,

Pushkal MishrA


Regards, Pushkal MishrA, This posting is provided "AS IS" with no warranties and confers no rights. I request you to test the solution in lab and post successful outcome you should try this on production.

  • Changed type Eason Huang Monday, June 29, 2015 10:52 AM

Reply:

Dear Pushkal

We have JIRA and Conflouence integrated with our Lync system and its not giving us any issues.

It is just that the end users will be able to only IM and look the presence in this, But its good since the end users no need to go and look into their Lync clients while doing their work in the JIRA,Confluence

YOu can integrated them on the addon tabs on both of the apps

YOu can decide on your authentication method FB or Windows


Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish (MVP)


------------------------------------

windows button not working

yesterday i updated my pc to windows 10 in that windows button, search and store not working please solve my problem

Reply:

Please check if you have installed Cumulative Update for Windows 10: August 5, 2015

https://support.microsoft.com/en-us/kb/3081424

Another option is to create another User Account with Administrative privileges.


S.Sengupta, Windows Experience MVP


------------------------------------
Reply:
yesterday i updated my pc to windows 10 in that windows button, search and store not working please solve my problem

Assuming right clicking at Start button still works ?

If yes, try the following...............

Right click at Start button > select Command Prompt (Admin) > type powershell > press Enter > wait a bit.

At the flashing prompt, copy and paste this.........

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

> press Enter.

Ignore any error in red.

When finished, try Start Menu again.


------------------------------------

SQL full text : How often the catalog is updated

Hi  i have this code in a stored procedure :

BEGIN TRANSACTION
INSERT INTO [OcrTrabajo] ([TextoPagina])
VALUES (@In_Texto_Pagina)
COMMIT
SELECT *      FROM OcrTrabajo t WHERE CONTAINS(t.TextoPagina, 'Texto a buscar - text to find')

and the result is (0 row(s) affected)

2. but this code return the rows

BEGIN TRANSACTION
INSERT INTO [OcrTrabajo] ([TextoPagina])
VALUES (@In_Texto_Pagina)
COMMIT
WAITFOR DELAY '00:00:03'   -- ???
SELECT *      FROM OcrTrabajo t WHERE CONTAINS(t.TextoPagina, 'Texto a buscar')

(5 row(s) affected)

Why  is slow to update catalog?

How often the catalog is updated?

The index change apply Change Tracking property is Automatic

thanks for your  help.

Jose Nadin Mendez.



Reply:

Read this article to improve performance and troubleshoot:

https://technet.microsoft.com/en-us/library/ms142560.aspx


------------------------------------

No comments:

Post a Comment

Setup is Split Across Multiple CDs

Setup is Split Across Multiple CDs Lately I've seen a bunch of people hitting installation errors that have to do with the fact th...