Sign In
Developer Support ADSI, WMI, Powershell Team Blog
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
.bat files
0x8007200a
80072030
Active Directory
AD LDS
ADAM
ADSI
base64
C++
DsAddSidHistory
DsBindWithSpnEx
Error
failover cluster manager
Filter
GPMC
GPO
Group Policy Object
GUID
IADsGroup
IEEE Standard 754
IGPM
PowerShell
script
System.DirectoryServices
WMI
Archive
Archives
January 2012
(4)
November 2011
(2)
December 2010
(1)
October 2010
(1)
June 2010
(1)
May 2010
(2)
April 2010
(1)
March 2010
(1)
December 2009
(2)
October 2009
(2)
September 2009
(3)
August 2009
(3)
July 2009
(2)
June 2009
(1)
May 2009
(1)
March 2009
(2)
February 2009
(2)
January 2009
(1)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Developer Support ADSI, WMI, Powershell Team Blog
WScript.Quit( Value ) does not always match the error code environment variable %errorlevel% in the command processor ( batch file processing ) environment.
Posted
28 days ago
by
Max Vaughn
0
Comments
In the windows scripting host environment, the WScript.Quit method can be used to return an exit code to a calling process. In 99.9% of the cases, the value set with the WSCript.Quit method will be returned as expected. If you are running your script...
Developer Support ADSI, WMI, Powershell Team Blog
Searching the Active Directory using PowerShell
Posted
1 month ago
by
Joe Cordero
0
Comments
In my last blog, I provided a sample PowerShell script that shows how to use the System.DirectoryServices namespace from .NET Framework to bulk create users. Now I will show you can you can use the same namespace to search the Active Directory. We...
Developer Support ADSI, WMI, Powershell Team Blog
Using a CSV file to create users by accessing the System.DirectoryServices namespace from a powershell script
Posted
1 month ago
by
Joe Cordero
0
Comments
There are several ways to programmatically create users in the Active Directory. The easiest way would be to use the Active Directory PowerShell Module. This is great if you have access to a Windows 2008 R2 domain controller as the Active Directory PowerShell...
Developer Support ADSI, WMI, Powershell Team Blog
Using the global error collection stored in the $Error variable to retrieve detailed error information in a powershell script
Posted
1 month ago
by
Joe Cordero
0
Comments
I was recently working with a developer who wanted to know if there is a way to get the error when they call the Invoke-Expression cmdlet. He was using the $LastExitCode to determine if it succeeded or not. Unfortunately, the $LastExitCode was not returning...
Developer Support ADSI, WMI, Powershell Team Blog
Automating the silent deployment of RemoteApp and Desktop Connection.
Posted
2 months ago
by
Joe Cordero
0
Comments
I have a customer that was trying to automate the RemoteApp and Desktop Connection but couldn't find any information that shows you the steps on how to do this. First, there is a feature on Windows 7 and Windows 2008 R2 called RemoteApp and Desktop...
Developer Support ADSI, WMI, Powershell Team Blog
Taking advantage of the PowerShell ISE
Posted
2 months ago
by
Joe Cordero
0
Comments
When Windows 7 was the first version of Windows that released which included the Windows PowerShell 2.0. For most users, using the PowerShell console is more than enough to perform some of the most common operations. What a lot of people don't know is...
Developer Support ADSI, WMI, Powershell Team Blog
Title: COMException error 0x5011 (S_ADS_ERRORSOCCURRED) while enumerating the PrincipalSearchResult collection returned from System.DirectoryServices.AccountManagetment UserPrincipal:: GetGroups method
Posted
over 2 years ago
by
ShaleenT
1
Comments
T he COMException error 0x5011 (S_ADS_ERRORSOCCURRED) can be thrown when you are enumerating the PrincipalSearchResult collection returned by UserPrincipal::GetGroups method if the UserPrincipal object is initialized with a PrincipalContext of a user...
Developer Support ADSI, WMI, Powershell Team Blog
How to work around the paging limitation in SQL Link Server when targeting the Active Directory.
Posted
over 2 years ago
by
ShaleenT
0
Comments
When we create a SQL Linked Server to AD, there are certain limitations. For example, we cannot retrieve multivalued attributes from AD. More information on limitations with SQL Linked Server queries can be found in http://support.microsoft.com/kb/299410...
Developer Support ADSI, WMI, Powershell Team Blog
Custom Disk Resource displayed with ‘?’ icon in Fail Over Cluster Manager on Windows 2008 R2 Servers
Posted
over 2 years ago
by
kudwived
0
Comments
You might see your custom storage class resource appears with a ‘?’ icon on Windows 2008 R2 Fail Over Cluster as shown in the following picture: The disk icon with ‘?’ mark may mislead the developers and end users of...
Developer Support ADSI, WMI, Powershell Team Blog
SDDL form of the SID doesn’t work in Active Directory filter on Windows 2000.
Posted
over 2 years ago
by
kudwived
0
Comments
Recently, I was working with a customer who was trying to get the user’s group membership using the TokenGroup attribute. In the VB.Net code, he was using this filter to get the group object back: Dim sid As String = "S-1-5-21-2146773085-903363285...
Developer Support ADSI, WMI, Powershell Team Blog
Create Proxy user in ADAM/AD LDS programmatically
Posted
over 2 years ago
by
kudwived
2
Comments
A proxy object is an object in ADAM that represents a security principal in Active Directory. Each proxy object in ADAM contains the SID of a user in Active Directory. Proxy objects (and proxy object classes) do not exist by default in ADAM. However,...
Developer Support ADSI, WMI, Powershell Team Blog
Retrieving product installation information using WMI via Powershell on a remote machine
Posted
over 2 years ago
by
kudwived
0
Comments
The WMI class Win32_product can be used to obtain a list of all the products installed on a remote machine. Below is a PowerShell example of how to use the Win32_Product class to retrieve product information from a remote machine: Get-WmiObject -Class...
Developer Support ADSI, WMI, Powershell Team Blog
Mapping VolumeID to Disk partition Using the DeviceIOControl API
Posted
over 2 years ago
by
Jitheshn
0
Comments
To map a volume with drive letter to disk partition, one may use some combination of WMI classes like Win32_LogicalDisk,Win32_LogicalDiskToPartition,Win32_DiskPartition, Win32_DiskDriveToDiskPartition and Win32_DiskDrive. Unfortunately WMI...
Developer Support ADSI, WMI, Powershell Team Blog
How does variable typing affect simple floating point arithmatic operations in Powershell, i.e. what is 1.1 – 1.04 ?
Posted
over 3 years ago
by
kudwived
0
Comments
PowerShell is a great scripting language. You can get complex results by just a one liner, which would have taken a couple of lines in the other scripting languages to generate the same output, but don’t be surprised if you find a simple subtraction 1...
Developer Support ADSI, WMI, Powershell Team Blog
ADAM running on Windows 2003 Gives exception 0x8007200a while updating null attributes
Posted
over 3 years ago
by
kudwived
0
Comments
Recently, I was working on a scenario where I was trying to update the attributes of ADAM objects. If I clear an attribute value which is null and then I call CommitChanges on the object, it gives me an exception : 0x8007200a (The specified directory...
Developer Support ADSI, WMI, Powershell Team Blog
Review: Windows PowerShell 2.0 Administrator's Pocket Consultant
Posted
over 3 years ago
by
drewarrowood
0
Comments
Bruce Payette, one of the original designers of PowerShell, visited us in Charlotte this week. One slide in his PowerPoint deck showed a stack of PowerShell books as long as my arm. Yet, the only book I’ve seen so far that covers the features of PowerShell...
Developer Support ADSI, WMI, Powershell Team Blog
Can we know who has changed an attribute in Active Directory?
Posted
over 3 years ago
by
drewarrowood
3
Comments
The articles you have seen so far on this blog have been largely demonstrations. When one of our customers asks us how they can do something, such as programmatically creating group policies, we write them some sample code that shows them how to do whatever...
Developer Support ADSI, WMI, Powershell Team Blog
Accessing a 64 bit WMI provider from a 32 bit application running on a 64 bit client
Posted
over 3 years ago
by
Max Vaughn
0
Comments
Ordinarily, if you create a 64 bit WMI provider to run on a server, you will create a corresponding 32 bit provider as well. In some instances, only a 64 bit WMI provider exists. This creates an interesting dilemma. Consider the scenario where a 32 bit...
Developer Support ADSI, WMI, Powershell Team Blog
How to retrieve currently applied GPOs on your local machine using WMI via Windows Scripting Host ( WSH )
Posted
over 3 years ago
by
ShaleenT
0
Comments
WMI provides two very useful Resultant Set of Policy (RSOP) classes that can be used together to determine the current set of GPOs that are applied to the local machine. The RSOP_GPO class provides information about GPOs that could be applied to...
Developer Support ADSI, WMI, Powershell Team Blog
An "Access Denied" exception is generated migrating users from Windows 2000 or 2003 domain to a Windows 2008 domain using DsAddSidHistory API and pass "SrcDomainController" & "SrcDomainCreds" as NULL
Posted
over 3 years ago
by
ShaleenT
0
Comments
An "Access Denied" exception is generated migrating users from Windows 2000 or 2003 domain to a Windows 2008 domain using DsAddSidHistory API ( http://msdn.microsoft.com/en-us/library/ms675918(VS.85).asp x ) and pass "SrcDomainController" & "SrcDomainCreds...
Developer Support ADSI, WMI, Powershell Team Blog
Getting an exception “The specified directory service attribute or value does not exist”, when you try to search a user in an AD container using System.DirectoryServices.AccountManagement.UserPrincipal::FindByIdentity
Posted
over 3 years ago
by
Jitheshn
1
Comments
This happens because If there is no container specified, the principal context class will create a System.DirectoryServices.DirectoryEntry object by binding to builtin CN=Users container to start searching for users. System.DirectoryServices is built...
Developer Support ADSI, WMI, Powershell Team Blog
Restoring object from the Active Directory Recycle Bin using AD Powershell
Posted
over 3 years ago
by
Joe Cordero
0
Comments
As anyone who has managed the Active Directory knows, if you delete an Active Directory object, although it marked as tombstoned, all the linked and non-linked attribute values are cleared. It is therefore difficult to reanimate the object because extra...
Developer Support ADSI, WMI, Powershell Team Blog
Working with Group Policy Objects Programmatically – Locating a GPO using the GPMC ( Group Policy Management Console ) object model in C++
Posted
over 3 years ago
by
Max Vaughn
2
Comments
In my previous post we discussed how to modify a registry based GPO programmatically. In this post we will focus on using the GPMC ( Group Policy Management Console ) object model to find a GPO that contains a specific string in the display name. The...
Developer Support ADSI, WMI, Powershell Team Blog
Working with Group Policy Objects Programmatically - simple C++ example illustrating how to modify a registry based policy
Posted
over 3 years ago
by
Max Vaughn
3
Comments
In my last bog post: http://blogs.msdn.com/dsadsi/archive/2009/07/23/working-with-group-policy-objects-programmatically-determining-registry-values-to-enable-disable-set-a-specific-policy.aspx I discussed an empirical method to determine the values...
Developer Support ADSI, WMI, Powershell Team Blog
Working with Group Policy Objects Programmatically - Determining registry values to Enable/Disable/Set a specific policy
Posted
over 3 years ago
by
Max Vaughn
0
Comments
Greetings! Over the past few months our team has seen a number of customer requesting information on how to programmatically/create/edit/read registry based GPO information. I took some time to combine a couple of samples into one that illustrates...
Page 1 of 2 (32 items)
1
2
MSDN Blogs
>
Developer Support ADSI, WMI, Powershell Team Blog