Hello,
I am trying to use an imported comman new-QADUser for creating a userobject in ActiveDirectory.
I'm simply doing : new-qaduser -name "$var1" -samaccountname "$var2" -parentcontainer "$ou".
This gives me an errormessage:
A device attached to the system is not functioning. (Exception fr
om HRESULT: 0x8007001F)
-------------------------------
If I replace -samaccount property with just a string like -samaccountname "string" the program runs smoothly. Why would I receive such a weird message when using a variable as the data?
If I do $var2 | get-member i get this:
System.Object Clone() int CompareTo(System.Object value), int CompareTo(string strB) bool Contains(string value) System.Void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) bool EndsWith(string value), bool EndsWith(string value, System.StringComparison comparisonType), bool EndsWith(string value, bool ignoreCase, System.Globalization.CultureInfo culture) bool Equals(System.Object obj), bool Equals(string value), bool Equals(string value, System.StringComparison comparisonType) System.CharEnumerator GetEnumerator() int GetHashCode() type GetType() System.TypeCode GetTypeCode() int IndexOf(char value), int IndexOf(char value, int startIndex), int IndexOf(char value, int startIndex, int count), int IndexOf(string value), int IndexOf(string value, int startIndex), int IndexOf(string value, int startIndex, int count), int IndexOf(string value, System.StringComparison comparisonType), int IndexOf(string value, int startIndex, System.StringComparison comparisonType), int IndexOf(string value, int startIndex, int count, System.StringComparison comparisonType) int IndexOfAny(char[] anyOf), int IndexOfAny(char[] anyOf, int startIndex), int IndexOfAny(char[] anyOf, int startIndex, int count) string Insert(int startIndex, string value) bool IsNormalized(), bool IsNormalized(System.Text.NormalizationForm normalizationForm) int LastIndexOf(char value), int LastIndexOf(char value, int startIndex), int LastIndexOf(char value, int startIndex, int count), int LastIndexOf(string value), int LastIndexOf(string value, int startIndex), int LastIndexOf(string value, int startIndex, int count), int LastIndexOf(string value, System.StringComparison comparisonType), int LastIndexOf(string value, int startIndex, System.StringComparison comparisonType), int LastIndexOf(string value, int startIndex, int count, System.StringComparison comparisonType) int LastIndexOfAny(char[] anyOf), int LastIndexOfAny(char[] anyOf, int startIndex), int LastIndexOfAny(char[] anyOf, int startIndex, int count) string Normalize(), string Normalize(System.Text.NormalizationForm normalizationForm) string PadLeft(int totalWidth), string PadLeft(int totalWidth, char paddingChar) string PadRight(int totalWidth), string PadRight(int totalWidth, char paddingChar) string Remove(int startIndex, int count), string Remove(int startIndex) string Replace(char oldChar, char newChar), string Replace(string oldValue, string newValue) string[] Split(Params char[] separator), string[] Split(char[] separator, int count), string[] Split(char[] separator, System.StringSplitOptions options), string[] Split(char[] separator, int count, System.StringSplitOptions options), string[] Split(string[] separator, System.StringSplitOptions options), string[] Split(string[] separator, int count, System.StringSplitOptions options) bool StartsWith(string value), bool StartsWith(string value, System.StringComparison comparisonType), bool StartsWith(string value, bool ignoreCase, System.Globalization.CultureInfo culture) string Substring(int startIndex), string Substring(int startIndex, int length) char[] ToCharArray(), char[] ToCharArray(int startIndex, int length) string ToLower(), string ToLower(System.Globalization.CultureInfo culture) string ToLowerInvariant() string ToString(), string ToString(System.IFormatProvider provider) string ToUpper(), string ToUpper(System.Globalization.CultureInfo culture) string ToUpperInvariant() string Trim(Params char[] trimChars), string Trim() string TrimEnd(Params char[] trimChars) string TrimStart(Params char[] trimChars) char Chars(int index) {get;} System.Int32 Length {get;}
-----------------------------------
looks kinda weird to me.
the variable itself gets set by two widnows.forms.textbox-fields.
any got some input on this cos' I got no idea on how to correct this
Kind regards,
bobby\z