How to list the members of local Administrators group with windows command line

Some time savers for you:

If you need to list all members in ANY local windows group this is the command line:

net localgroup Administrators

If you need to list a domain group

net group MyGroupName /domain

if you need to see information for a domain user (includes is active and his groups):

net user MyUserName /domain

Cheers,

Nik

How to list the members of local Administrators group with windows command line

Creating new IIS site and ERROR ( message:Failed to add duplicate collection element “yoursite”. )

If you executed a command line to create a new website in IIS8 and encountered: ERROR ( message:Failed to add duplicate collection element “yoursite”. ) this is what fixed in my case.

After executing:

C:\windows\system32\inetsrv\appcmd.exe add site /name:YourSite /id:12 /bindings:"http/*:8099:"  /physicalpath:E:\inetpub\yoursite

It errored out with the message above, and I thought that there is already a site with this name. Searing and googling and checking %windir%\system32\inetsrv\config\applicationHost.config I found nothing!

The problem was not the name it was the id!

/id:12

So if you have duplicate id the error is the same as duplicate name.
EDIT: Change the id with some unused number and you are good to go.

I hope this saves you time!

Creating new IIS site and ERROR ( message:Failed to add duplicate collection element “yoursite”. )

msbuild cannot build visual studio setup projects – for real!

Screen Shot 2015-07-16 at 9.49.05 PMI had a funny experience today with msbuild and Visual Studio project type: setup package (vdproj).

In attempt to introduce a new solution to cruisecontrol.net (my clients choice, not mine) we encountered a situation when the build was green but no output media!

After digging more, I saw that the solution was building fine except the last project – the main setup project that we were expecting as result media. Checking the logs showed that all project build fine, but when msbuild hits the *.vdproj reports warning:

todo: add the warning here

In my book, this should have been an error… The problem was that I did not believe it! We had at least two other projects like this one, and they were building fine for a long time. Ignoring the common sense and the meaning of the warning I’ve started rather long googling exercise about this situation. All articles were pointing that we should use devenv.exe for vdproj type, but I still did not want to believe. How the hack my other two projects were good to go, but not this one?!?

Finally my rational side kicked off and my hunger to understand the big “Why?” kicked off, and I went to the basics.

Let see how the successful projects are build – and I was so sure that we are using msbuild for everything…

Checking the log revealed right away that the usual command line with msbuil.exe is missing…

You gotta love the job as a developer and in some cases as DevOps – it keeps you real and focused every day. It challenges your assumptions.

My favorite quote was proven true for a millionth time: “The computer will not do what you want, but what you are telling it to do!”

Checking more details for those particular successful project showed me that they are treated as special type of build, and our scripts were using the devenv.exe

I understand that it will be painful for you to build .vdproj type if your build server does not have installed Visual Studio – aka devenv is missing…

Note to myself: in case we move to ThoughtsWorks GO and we start using multiple agents on different servers that do not have devenv – what should be the best option for building?…
Please comment bellow if you have experience with this.

Thanks in advance,
Nik

msbuild cannot build visual studio setup projects – for real!