[E2010] [EWSMA] [PowerShell]: PidTagSentRepresentingName Missing

During a cross forest Exchange migration, some mail items in the target organization are missing the PidTagSentRepresentingName property (shown below).  About 5% of all messages of a specific message class are missing the "From" field value. 
What I am trying to do is grab that property value from the source mailbox and then update the mail item in the target forest with that same value.  My problem is that I can't seem to read that property or update it either.  Does anyone have a way
to read that thing?  update it?  Here is the property itself that I am trying to read and then update(code below):
<property tag = "0x0042001F" type = "PT_UNICODE">
  <ExactNames>PR_SENT_REPRESENTING_NAME_W, PidTagSentRepresentingName</ExactNames>
  <PartialNames>PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_NAME_A, ptagSentRepresentingName</PartialNames>
  <Value><![CDATA[Dasani, James W]]></Value>
  <AltValue>cb: 32 lpb: 520069006700670069006E0073002C0020004E0061006E006300790020005700</AltValue>
 </property>
$searchFilter = New-Object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.ItemSchema]::ItemClass, $MessageClass)
$view = New-Object Microsoft.Exchange.WebServices.Data.ItemView($pageSize, $offset, [Microsoft.Exchange.WebServices.Data.OffsetBasePoint]::Beginning)
$view.PropertySet = New-Object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::IdOnly, [Microsoft.Exchange.WebServices.Data.ItemSchema]::ItemClass, [Microsoft.Exchange.WebServices.Data.ItemSchema]::Subject, [Microsoft.Exchange.WebServices.Data.ItemSchema]::DateTimeCreated, [Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::IsRead, [Microsoft.Exchange.WebServices.Data.ItemSchema]::ItemClass, [Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::From, [Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::Sender)
$view.Traversal = [Microsoft.Exchange.WebServices.Data.ItemTraversal]::Shallow
$results = $service.FindItems( $FolderId, $searchFilter, $view )
#$results = $service.FindItems( $FolderId, $view )
ForEach ($item in $results.Items)
ProcessItem $item
$moreItems = $results.MoreAvailable
$offset += $pageSize
My apologies in advance for the programming shoddiness, I'm not a developer, but am trying to set this right.
Function ProcessItem( $item )
Write-Host $item.itemclass
write-host $item.getloadedpropertydefinitions()
write-host $item.From
write-Host $item.Sender
write-host $item.Sender.tostring()
#$item.From = "wut"
$item.Sender = "Wut"
$item.Update([Microsoft.Exchange.WebServices.Data.ConflictResolutionMode]::AlwaysOverwrite)
I get multiple errors when I run this.  I'm not 100% sure which property represents the PidTagSentRepresentingName (From or Sender), in fact I have this strong suspicion that I am missing something fairly major in how to go about this.  Right now,
I'm just trying to figure out how to read that value successfully (part 1), then how to update it successfully(part 2).  I can use the same code to read the item class, loaded property definitions, all that sort of thing.  I am making the connection
successfully and am getting back data.  Any help would be greatly appreciated.
James

If your only worried about the PidTagSentRepresentingName property then just get/set that through the extended properties eg
$psPropset= new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)
$PR_SENT_REPRESENTING_NAME = new-object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition(0x0042,[Microsoft.Exchange.WebServices.Data.MapiPropertyType]::String);
$psPropset.Add($PR_SENT_REPRESENTING_NAME);
# Bind to the Inbox Folder
$folderid= new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Inbox,$MailboxName)
$Inbox = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$folderid)
$ivItemView = New-Object Microsoft.Exchange.WebServices.Data.ItemView(1)
$ivItemView.PropertySet = $psPropset
$fiItems = $null
$fiItems = $service.FindItems($Inbox.Id,$ivItemView)
#[Void]$service.LoadPropertiesForItems($fiItems,$psPropset)
foreach($Item in $fiItems.Items){
$SenderVal = $null;
if($Item.TryGetProperty($PR_SENT_REPRESENTING_NAME,[ref]$SenderVal)){
Write-host $SenderVal
$Item.SetExtendedProperty($PR_SENT_REPRESENTING_NAME,"blah");
$Item.Update([Microsoft.Exchange.WebServices.Data.ConflictResolutionMode]::AlwaysOverWrite)
Cheers
Glen

Similar Messages

  • BUG - Powershell/PSExec - Missing Information outside ISE

    I´m affected of this Bug in Powershell/PSExec
    http://stackoverflow.com/questions/22593651/powershell-psexec-job
    Executing powershell script and execute for example ping/tracert/iperf
    via psexec on remote-hosts is working very well. 
    In ISE I see all the Information I expect. But I´m the interesting information is missing outside ISE.
    For example in ISE:
    PS C:\Scripts> .\tracert.ps1 -ComputerName REMOTEHOST -target TARGETHOST
    PsExec v2.1 - Execute processes remotely
    Copyright (C) 2001-2013 Mark Russinovich
    Sysinternals - www.sysinternals.com
    Starting tracert.exe on REMOTEHOST...REMOTEHOST...
    tracert.exe exited on REMOTEHOST with error code 0.
    From REMOTEHOST to TARGETHOST <br>
    Routenverfolgung zu TARGETHOST [200.100.100.1]  über maximal 30 Abschnitte:
      1    74 ms    <1 ms    <1 ms  100.100.100.5
      2    <1 ms    <1 ms    <1 ms  Router1 [120.12.245.101]
      3     1 ms    <1 ms    <1 ms  Router2 [130.12.246.101]
      4     1 ms    <1 ms    <1 ms  Router3 [150.12.247.101]
      5     1 ms    <1 ms    <1 ms  TARGETHOST  [200.100.100.1]
    Ablaufverfolgung beendet.
    Fine? NO!!!
    Write to File, Print,execute the Script via IIS/PHP everything fails!
    Only this Information outside ISE:
    C:\scripts\tracert.ps1 -ComputerName REMOTEHOST  -target TARGETHOST
    From REMOTEHOST  to TARGETHOST
    Routenverfolgung zu TARGETHOST [200.100.100.1]  über maximal 30 Abschnitte:
    PLS HELP!!!
    Invoke-Command cannot be used here

    I´m affected of this Bug in Powershell/PSExec
    http://stackoverflow.com/questions/22593651/powershell-psexec-job
    Executing powershell script and execute for example ping/tracert/iperf
    via psexec on remote-hosts is working very well. 
    In ISE I see all the Information I expect. But I´m the interesting information is missing outside ISE.
    For example in ISE:
    PS C:\Scripts> .\tracert.ps1 -ComputerName REMOTEHOST -target TARGETHOST
    PsExec v2.1 - Execute processes remotely
    Copyright (C) 2001-2013 Mark Russinovich
    Sysinternals - www.sysinternals.com
    Starting tracert.exe on REMOTEHOST...REMOTEHOST...
    tracert.exe exited on REMOTEHOST with error code 0.
    From REMOTEHOST to TARGETHOST <br>
    Routenverfolgung zu TARGETHOST [200.100.100.1]  über maximal 30 Abschnitte:
      1    74 ms    <1 ms    <1 ms  100.100.100.5
      2    <1 ms    <1 ms    <1 ms  Router1 [120.12.245.101]
      3     1 ms    <1 ms    <1 ms  Router2 [130.12.246.101]
      4     1 ms    <1 ms    <1 ms  Router3 [150.12.247.101]
      5     1 ms    <1 ms    <1 ms  TARGETHOST  [200.100.100.1]
    Ablaufverfolgung beendet.
    Fine? NO!!!
    Write to File, Print,execute the Script via IIS/PHP everything fails!
    Only this Information outside ISE:
    C:\scripts\tracert.ps1 -ComputerName REMOTEHOST  -target TARGETHOST
    From REMOTEHOST  to TARGETHOST 
    Routenverfolgung zu TARGETHOST [200.100.100.1]  über maximal 30 Abschnitte:
    PLS HELP!!!
    Invoke-Command cannot be used here

  • Exchange Powershell Commands Missing from EMS

    I just performed a fresh install of Exchange 2013 w/ SP1 on Windows 2012 Standard R2 which is also a domain controller in an organization that already has an Exchange 2010 server (on a separate server). When I launch the Exchange Management Shell and attempt
    to run "Get-ExchangeServer" I get the error "The term 'Get-ExchangeServer' is not recognized as the name of a cmdlet, function, script file, or operable program..." I see that \\HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.Exchange.Management.PowerShell.SnapIn
    is loading the module name "D:\Program Files\Microsoft\Exchange\bin\Microsoft.Exchange.PowerShell.Configuration.dll" (which is the correct path to that file).
    I've restarted the server twice and have the same issue. Also tried doing an unattended install of just the Managment Tools since using the setup GUI didn't give me the option of uninstalling and reinstalling the Management Tools since the checkbox is greyed
    out. I searched the ExchangeSetup log for errors and didn't find any.
    How do I get the Exchange Management Shell to register the Exchange Powershell commands? Do I need to uninstall Exchange and Re-Install?

    Open Powershell as Administrator.
    1. Add-Pssnapin *Setup*
    2. Install-CannedRbacRoleAssignments -InvocationMode Install -verbose
    3. Install-CannedRbacRoleAssignmentSRAP -InvocationMode Install -verbose
    4. Install-CannedRbacRoles -InvocationMode Install -verbose
    Try the above commands and let me know if that helps
    if that doesn't can you run the below command reply back with the output
    Get-Command |?{$_.Name -like "Get-Exchange*"}
    ***VOTE IF HELPFUL / MARK ANSWER IF ANSWERS ***
    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your
    question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

  • [E2010] [EWSMA] [C#] [Windows]: How do I get Tasks to show up in the Calendar view

    When creating a task from EWS, the Owner field is empty.  I believe this causes my created Task to disappear when I am in the Calendar view (showing Tasks on the bottom).  The created Task still shows up in the Tasks view, but not the Calendar
    view (where Tasks are on the bottom).
    Creating a task in Outlook shows it on the Calendar view, but creating a Task with the same values from EWS does not show it there.  The only difference is the Owner field of the Task, which is read-only in EWS.  Can we set this somehow?
    ExchangeService ews;
    ews = new ExchangeService();
    ews.UseDefaultCredentials = true;
    ews.AutodiscoverUrl("[email protected]");
    Task taskItem = new Task(ews);
    taskItem.Subject = "subject";
    taskItem.Body = "body";
    taskItem.IsReminderSet = true;
    taskItem.ReminderDueBy = DateTime.Now;
    taskItem.StartDate = DateTime.Now;
    taskItem.Save();
    Thanks,
    -Daniel

    I can sort of reproduce what your talking about I think its because your setting the Start and Due date to the same time which seems to affect the search folder that's used for the view. The following seems to work okay for me
    Task taskItem = new Task(service);
    taskItem.Subject = "Created From qqq";
    taskItem.Body = "body";
    taskItem.IsReminderSet = true;
    taskItem.ReminderDueBy = DateTime.Now;
    taskItem.StartDate = DateTime.Now;
    taskItem.DueDate = DateTime.Now.AddHours(1);
    taskItem.Status = TaskStatus.NotStarted;
    ExtendedPropertyDefinition PidLidToDoOrdinalDate = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Common, 0x85A0, MapiPropertyType.SystemTime);
    taskItem.SetExtendedProperty(PidLidToDoOrdinalDate, DateTime.Now.AddHours(1));
    ExtendedPropertyDefinition FlagDueBy = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Common, 0x8560, MapiPropertyType.SystemTime);
    taskItem.SetExtendedProperty(FlagDueBy, DateTime.Now.AddHours(1));
    taskItem.Save();
    Cheers
    Glen

  • [E2010][EWSMA] Impersonation Configuration

    Hi
    Exchange 2010 SP2
    EWS API 2.0
    I'm looking for specific advice regarding configuring of impersonation accounts and security groups.
    Environment
    We have a single Exchange 2010 production environment with 2 CAS servers in different domains. I have 3 environments development, QA and production that have WCF and Windows service that access Exchange and
    act as an interface to Exchange to a back-end application also running in each environment. All environment services are running and accessing Exchange.
    Current Impersonation Setup
    A single impersonation account used in the services to impersonate in development, QA and production environments.
    Three security groups that contain users to impersonate specific to each environment.
    Three ManagementScope and ManagementRoleAssignment configured in Exchange, one for each environment/security group, all assigned to the single impersonation user account. Both QA and production services are running and accessing Exchange
    Question
    Is this a recommended configuration in this scenario?
    3 environments, 3 security groups, 3 impersonation roles/scope to 1 impersonation user in 1 Exchange environment?
    Issues
    We seeing intermittent exceptions being raised by EWS 'access denied' on updating tasks and appointments for valid impersonation user accounts in the production services.
    If anyone has any advice about this being a valid configuration, it would be very much appreciated.
    Kind regards,
    Lee

    You should be able to use the Extended properties to work this out have a read of
    http://msdn.microsoft.com/en-us/library/office/cc815707(v=office.15).aspx .
    eg this should cover your case "For example, suppose John is receiving Sally's messages while Sally is on vacation. The PR_RCVD_REPRESENTING properties
    identify John as the delegate recipient. When John sends a reply to a message that he has received for Sally, the message's PR_SENDER properties
    identify John as the sender. Because John is representing Sally, the PR_SENT_REPRESENTING properties
    identify Sally."
    ExtendedPropertyDefinition PR_SENDER_NAME = new ExtendedPropertyDefinition(0x0C1A,MapiPropertyType.String);
    ExtendedPropertyDefinition PR_SENT_REPRESENTING_NAME = new ExtendedPropertyDefinition(0x0042, MapiPropertyType.String);
    PropertySet psPropSet = new PropertySet(BasePropertySet.FirstClassProperties) { PR_SENDER_NAME, PR_SENT_REPRESENTING_NAME };
    Message.Load(psPropSet);
    String PR_SENDER_NAMEval = "";
    String PR_SENT_REPRESENTING_NAMEval = "";
    if(Message.TryGetProperty(PR_SENDER_NAME,out PR_SENDER_NAMEval)){
    Console.WriteLine(PR_SENDER_NAMEval);
    if (Message.TryGetProperty(PR_SENT_REPRESENTING_NAME, out PR_SENT_REPRESENTING_NAMEval))
    Console.WriteLine(PR_SENT_REPRESENTING_NAMEval);
    Cheers
    Glen

  • How to trap Command Line errors

    Sigh.  I have searched for 3 hours to the answer for my question.  I'm new to scripting, so perhaps this is the problem in my not finding a solution.
    In a nutshell, I simply want to gracefully trap command line usage of a script.  I want to have my script accept a parameter (ie. a value) and a switch.
    Example:  <script> -path <path> -set
    The problem is that i cannot trap incorrect usage.  I would prefer <path> to be position one, and -switch to be position 2 of the parameters passed to the script.  I have not tried this "outside" of PS v2.0 ISE (ie. Powershell.exe). 
    Of course, I would love it to work in both environments.
    I KNOW that the ISE will prompt for missing mandatory parameters.  Great.  But incorrectly specified parameters causes Powershell ISE to "bomb-out".  That is, displaying error messages to an uninformed user whom views it as unintelligible.
    Example of incorrect usage:  <script> -pat <path> -set
    Again, I would LOVE to trap this, and display correct USAGE to the screen.  Unfortunately, this produces a Powershell error message which has proved unintelligible to "simple" users.
    Perhaps I must accept that this is not possible in Powershell v2.0.  I simply want to program my script to CATCH this error and take the desired action.
    HELP!!!  To the knowledgeable and generous Scripting Professionals.
    If the directions say go straight, but I turn left, then right: Will I still get there?

    Okay, I stripped down the script:
    <#
    ===============================================================================
    PQSC PowerShell Source File
    NAME   :
    AUTHOR : PQSC.Programmer
    DATE   :
    COMMENT: Expects -->U:\Users\Public\Public Programs\PQSC\Scripts<-- appended to Execution Path
             CommandLine to Test=powershell -debug -command "U:\Users\PQSC.Programmer\Documents\WindowsPowerShell\Get-FilesWithArchiveBitSet.ps1" -x
    ===============================================================================
    #>
    <# ---------------------------------------------
    # Param1 is mandatory, Param2 is optional.
    # Param1 should be:  -path <path>
    # Param2 should be:  -Set
    #>
    [CmdletBinding()]
    Param(
        [parameter(Mandatory=$true,Position=1)]
        [AllowNull()]
        [AllowEmptyString()]
        [String]
        $Path,
        [switch]
        $Set_Archive
    PRODUCES THIS ERROR in PowerShell v2.0 ISE when invoke with:
    powershell -debug -command "U:\Users\PQSC.Programmer\Documents\WindowsPowerShell\Get-FilesWithArchiveBitSet.ps1" -x
    powershell.exe : Missing expression after unary operator '-'.
    At line:1 char:11
    + powershell <<<<  -debug -command "U:\Users\PQSC.Programmer\Documents\WindowsPowerShell\Get-untitled2.ps1" -x
        + CategoryInfo          : NotSpecified: (Missing express...y operator '-'.:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    At line:1 char:2
    + - <<<< debug -command U:\Users\PQSC.Programmer\Documents\WindowsPowerShell\Ge
    t-untitled2.ps1 -x
        + CategoryInfo          : ParserError: (-:String) [], ParentContainsErrorR
       ecordException
        + FullyQualifiedErrorId : MissingExpressionAfterOperator
    If the directions say go straight, but I turn left, then right: Will I still get there?

  • Server 2012 r2 only boots to command prompt

    Hello All, I have been trying to get SharePoint 2013 Foundation on a fresh server. (This is not a SharePoint question) Server 2012 R2 was working fine. However problems getting all the prerequisites installed and configured properly. When I was making
    changes I was required to restart server. When I did I was able to get to the login screen. Then login seemed to work except that all I was able to get was command prompt after login. I am able to run SCONFIG. However the "restore gui" selection
    is missing. Also powershell.exe will not run stating it is an unknown command. I checked through folders and those folders appear to be missing. At this point I have no idea how to much of anything. I was able to download and install updates. Ha thanks MS.
    Otherwise any help is greatly appreciated.

    The same scenario described occurred here: ServerManager would not launch, PowerShell was missing from the expected location in the system drive, explorer.exe was missing, and msconfig.exe was missing, etc.
    Interestingly enough, the server seemed intact in other ways, such as the administrative share worked (\\servername\c$), and it would reboot normally enough, but to a black screen with a command prompt.
    A small syntactical correct to step 5. above should be noted: '/wimfile'... not '/winfile' 
    dism /get-wiminfo /wimfile:d:\sources\install.wim
    Other than that, R.Derickson, the fix worked to bring back the expected graphical state.
    Thank you.

  • Missing-anchor-value Error using PowerShell MA (Soren Granfeldt)

    Hi Everyone,
    I'm triying  to do a simple sinchronization using PowerShel MA (Soren Granfeld) v5.0. I've already configured the MA, but when I do a Full Import the Sync Engine sent me: missing-anchor-value. I configured the anchor attribute based on the blog PowerShel
    MA (Soren Granfeld).
    Scheema Script
    $obj = New-Object -Type PSCustomObject
    $obj | Add-Member -Type NoteProperty -Name "Anchor-Id|String" -Value 1
    $obj | Add-Member -Type NoteProperty -Name "objectClass|String" -Value "user"
    $obj | Add-Member -Type NoteProperty -Name "AccountName|String" -Value "SG"
    $obj | Add-Member -Type NoteProperty -Name "FirstName|String" -Value "Soren"
    $obj | Add-Member -Type NoteProperty -Name "LastName|String" -Value "Granfeldt"
    $obj | Add-Member -Type NoteProperty -Name "DisplayName|String" -Value "Soren Granfeldt"
    $obj | Add-Member -Type NoteProperty -Name "Description|String" -Value "Standard User"
    $obj
     Import Script
    $obj = @{}
    $Obj.Add("Id", "1")
    $obj.Add("LastName","Cas")
    $obj.Add("[DN]","2")
    $obj.Add("AccountName","rodcas")
    $obj.Add("FirstName","Rod")
    $obj.Add("DisplayName","Rod Cas")
    $obj.Add("Description","IT")
    $obj
    Anyone can help me please?
    Thanks in advance,

    I think it's because there is no objectclass property on the import object. It's required attribute. The sample on the website may be wrong. Try adding $obj.objectclass = 'user' in the import script
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • Manage MSMQ is missing from Failover Cluster Manager when configured using powershell

    Hi,
    I am hoping someone would be able to help me as I have looked on the internet for an answer to this. We deploy a number of servers that are configured using Powershell. I am in the process of creating a clustered WIN2K8R2 cluster with MSMQ. I am able to
    do this successfully through the Failover Mgr with no issues.  In addition, I can do this via Powershell (code listed below) with one caveat.
    However, when I create the same exact MSMQ in Powershell, I am unable to right click on the MSMQ service to manage it as the "Manage MSMQ" is missing when I right click on it. The settings are the same, including dependencies. The only difference
    I have been able to find is the icon in the Failover Manager shows the Service as a Generic Service icon when created in Powershell, but when it is created in the GUI it shows up as the MSMQ icon. I was able to verify this in the registry in HKLM\Cluster\Groups\<GUID>\:
    GroupType HEX: 68 for msmq icon. When it is the Generic Service icon it is HEX: 270f. When I change it from 270f to 68, the icon changes in Failover Manager and I am able to open, but then I get an invalid handle and I am unable to manage it.
    This is causing an issue, because I want to automate this build and hand it over, but they would be unable to manage it except by programming which the operators are not ready for.
    Here is the code which I have created in Powershell:
        Write-host "Configuring MS MSMQ Cluster Failover..."
        $CluName = "Cluster Name"
        $ClsMSMQName = $CluName.Name + "MSMQ"
        $ClsMSMQResourceName = "MSMQ-" + $ClsMSMQName
        $Response = Read-host "Enter the IP Address of the Clustered MSMQ"
        $ClsIpRes = get-clusterresource "Cluster IP Address"
        $MSMQIpAddr = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $ipres,Address,$Response
        Add-ClusterServerRole -Name $ClsMSMQName -Storage "Cluster Disk" -StaticAddress $MSMQIpAddr.value
        # Add the MSMSMQ Service to the new Server Role
        Get-ClusterGroup $ClsMSMQName | Add-ClusterResource -Name $ClsMSMQResourceName -ResourceType "MSMQ"
        # Create Dependencies for the MSMQ group
        Add-ClusterResourceDependency $ClsMSMQResourceName $ClsMSMQName
        Add-ClusterResourceDependency $ClsMSMQResourceName "Cluster Disk"
        # Start MSMQ group
        Start-ClusterGroup $ClsMSMQName
    You would just have to change "Cluster Disk" and "Cluster Name".
    Thank you

    Hi,
    I am hoping someone would be able to help me as I have looked on the internet for an answer to this. We deploy a number of servers that are configured using Powershell. I am in the process of creating a clustered WIN2K8R2 cluster with MSMQ. I am able to
    do this successfully through the Failover Mgr with no issues.  In addition, I can do this via Powershell (code listed below) with one caveat.
    However, when I create the same exact MSMQ in Powershell, I am unable to right click on the MSMQ service to manage it as the "Manage MSMQ" is missing when I right click on it. The settings are the same, including dependencies. The only difference
    I have been able to find is the icon in the Failover Manager shows the Service as a Generic Service icon when created in Powershell, but when it is created in the GUI it shows up as the MSMQ icon. I was able to verify this in the registry in HKLM\Cluster\Groups\<GUID>\:
    GroupType HEX: 68 for msmq icon. When it is the Generic Service icon it is HEX: 270f. When I change it from 270f to 68, the icon changes in Failover Manager and I am able to open, but then I get an invalid handle and I am unable to manage it.
    This is causing an issue, because I want to automate this build and hand it over, but they would be unable to manage it except by programming which the operators are not ready for.
    Here is the code which I have created in Powershell:
        Write-host "Configuring MS MSMQ Cluster Failover..."
        $CluName = "Cluster Name"
        $ClsMSMQName = $CluName.Name + "MSMQ"
        $ClsMSMQResourceName = "MSMQ-" + $ClsMSMQName
        $Response = Read-host "Enter the IP Address of the Clustered MSMQ"
        $ClsIpRes = get-clusterresource "Cluster IP Address"
        $MSMQIpAddr = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $ipres,Address,$Response
        Add-ClusterServerRole -Name $ClsMSMQName -Storage "Cluster Disk" -StaticAddress $MSMQIpAddr.value
        # Add the MSMSMQ Service to the new Server Role
        Get-ClusterGroup $ClsMSMQName | Add-ClusterResource -Name $ClsMSMQResourceName -ResourceType "MSMQ"
        # Create Dependencies for the MSMQ group
        Add-ClusterResourceDependency $ClsMSMQResourceName $ClsMSMQName
        Add-ClusterResourceDependency $ClsMSMQResourceName "Cluster Disk"
        # Start MSMQ group
        Start-ClusterGroup $ClsMSMQName
    You would just have to change "Cluster Disk" and "Cluster Name".
    Thank you

  • Write-Progress in PowerShell script for installing Missing Updates

    Hi, I had a previous question here
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/88931488-3b2c-4c08-9ad3-6651ba9bbcef/action?threadDisplayName=progress-indicator-for-installing-missing-sccm-2012-r2-updates
    But that method is not working as expected.  The progress bar displays then continues to increment past 100 throwing an error each time.
    I'm thinking I could use a foreach loop for the missing updates but I'm just lost when it comes to Powershell syntax.
    For example:
    # Get the number of missing updates
    [System.Management.ManagementObject[]] $CMMissingUpdates = @(GWMI -ComputerName $server -query "SELECT * FROM CCM_SoftwareUpdate WHERE ComplianceState = '0'" -namespace "ROOT\ccm\ClientSDK") #End Get update count.
    $result.UpdateCountBefore = "The number of missing updates is $($CMMissingUpdates.count)"
    #Install missing updates.
    #Begin example code, not tested.
    Foreach ($update in $CMMissingUpdates)
    $i++
    If ($CMMissingUpdates.count) {
    $CMInstallMissingUpdates = (GWMI -ComputerName $server -Namespace "root\ccm\clientsdk" -Class "CCM_SoftwareUpdatesManager" -List).InstallUpdates($CMMissingUpdates)
    Do {
    Start-Sleep -Seconds 15
    [array]$CMInstallPendingUpdates = @(GWMI -ComputerName $server -query "SELECT * FROM CCM_SoftwareUpdate WHERE EvaluationState = 6 or EvaluationState = 7" -namespace "ROOT\ccm\ClientSDK")
    #end my example code.
    #The code below is working to install updates but Write-Progress isn't.
    If ($CMMissingUpdates.count) {
    #$result.UpdateCountBefore = "The number of missing updates is $($CMMissingUpdates.count)"
    $CMInstallMissingUpdates = (GWMI -ComputerName $server -Namespace "root\ccm\clientsdk" -Class "CCM_SoftwareUpdatesManager" -List).InstallUpdates($CMMissingUpdates)
    #Set the missing updates to variable for progress indicator.
    $updates = $CMMissingUpdates.Count
    $Increment = 100 / $updates
    $Percent = 0
    Do {
    Start-Sleep -Seconds 15
    [array]$CMInstallPendingUpdates = @(GWMI -ComputerName $server -query "SELECT * FROM CCM_SoftwareUpdate WHERE EvaluationState = 6 or EvaluationState = 7" -namespace "ROOT\ccm\ClientSDK")
    #Not 100% sure $result.UpdateCountBefore is needed below.
    $result.UpdateCountBefore = "The number of pending updates for installation is: $($CMInstallPendingUpdates.count)"
    Write-Progress -Activity "Updates are installing..." -PercentComplete $Percent -Status "Working..."
    $Percent = $Percent + $Increment
    } While (($CMInstallPendingUpdates.count -ne 0) -and ((New-TimeSpan -Start $StartTime -End $(Get-Date)) -lt "00:45:00"))
    Write-Progress -Activity "Updates Installed" -Status "Done" -Completed
    } ELSE {
    $result.UpdateCountAfter = "There are no missing updates."}
    $result

    The increment should be 100  / (max number of items)
    That will not exceed 100 through (max number of items ) iterations in a loop
    Mathematically that can be written as 
    100 / (Max Number of items) * (max number of items ) iterations in a loop
    = 100 * ( (Max Number of Item) / (Number Iterations in a loop) )
    = 100 * 1 = 100
    The (max number of items) and (Number of Iterations in a loop ) need to be based on the same number.
    In the script, it is not based on the same number.
    The maximum number of items is $CMMissingUpdates.Count
    The number of iterations in the loop  is based on the condition 
    ($CMInstallPendingUpdates.count -ne 0)
    Which causes the iterations of the loop to exceed $CMMissingUpdates.Count
    Assuming the $CMInstallPendingUpdates.count is going down (is decremented) through the loop, then
    $Increment = 100 /
    $CMInstallPendingUpdates.count

  • PowerShell 1.0 fails to start, wants some missing snap-in

    I get the following error when I attempt to start PowerShell 1.0:
    Windows PowerShell terminated with the following error:
    Cannot load Windows PowerShell snap-in Microsoft.PowerShell.Diagnostics because
    of the following error: Could not load file or assembly 'file:///C:\Windows\Sys
    tem32\WindowsPowerShell\v1.0\Microsoft.PowerShell.Commands.Diagnostics.dll' or o
    ne of its dependencies. The system cannot find the file specified.
    Indeed, the file is not present on my system, but it is also not present on other Windows 7 machines I have.
    How do I fix this error so I could use PowerShell?  How/where can I remove that snap-in so it would stop asking for it?
    I have Windows 7 Home Premium 64-bit
    Thanks in Advance!

    Hi,
    I think the fastest way of troubleshooting is installing the most current version of PowerShell, which would be version 4.0.
    Best greetings from Germany
    Olaf
    Thanks for the suggestion.  I tried installing 4.0, but it fails:
    Some updates were not installed
    The following updates were not installed:
    Update for Windows (KB2819745)
    I think the installer requires execution of PowerShell scripts, so if existing PowerShell is broken, the new one will fail to install.
    Also, are versions other than 1.0 compatible with Visual Studio 2013?  Visual Studio uses PowerShell internally for a number of things, such as adding modules when creating a project.
    I think the right approach would be to fix PowerShell 1.0 instead of trying to cover it with something else.
    Suggestions are appreciated.

  • Missing statement body foreach loop in powershell

    I am working on powershell script mentioned below
    $filename= $arg[0]
    $includePath = "$(Split-Path -Path $MyInvocation.MyCommand.Path -Parent | Split-Path -Parent)\include" .
     $includePath\utils.ps1; 
    $AmisysConnectionStringName;
     Run-Job -JobName 'ucmu073'
     { $files = @{ ICD10 = @{$Edit_Function = $params[1], $Table_Function = $params[2], $Code_Function = $params[3]}
     foreach($file in dir $UCMCSVLoadLocation2 -Recurse -Include @("*.csv")) #$files.GetEnumerator()) #$filename = $file_desc.Key $params[1] $params[2] $params[3]}
     #$filePath = "C:\jobs\AA\DEV6\UCM\${filename}.csv" $importFile = Import-CSV $filePath foreach($item in $importFile) 
    { $proc1 = $item.DIAG_NBR 
    $proc2 = $item.DIAG_NBR # $ymdeff = $item.YMDEFF #$ymdend = $item.YMDEND #$ymdtrans = $item.YMDTRANS
     Write-Verbose "$proc1, $proc2" $currentDate = Get-Date -Format yyyyMMdd # 
    # * Insert codes and fees into the su_edit_detail.
    '{0,-60}{1,20}' -f "Insert TEEN PREGNANCY ICD9 AND ICD10 CODES into the su_edit_detail ",(Get-Date -Format yyyyMMdd:hhmmss); $myQuery = @" SET PAGES 600; SET LINES 4000; SET ECHO ON; SET serveroutput on; WHENEVER sqlerror exit sql.sqlcode; insert
    into SU_EDIT_DETAIL(EDIT_FUNCTION, TABLE_FUNCTION, CODE_FUNCTION, CODE_TYPE,CODE_BEGIN, CODE_END, EXCLUDE, INCLUDE_X, OP_NBR, TRANSCODE, VOID, YMDEFF, YMDEND, YMDTRANS) select '$edit_func','$table_func','$code_func','DIAG','$proc1','$proc2',' ',' ','MIS',
    'C',' ',20141001, 99991231, 20131120 from dual where not exists(select * from SU_EDIT_DETAIL where (EDIT_FUNCTION = '$edit_func' and TABLE_FUNCTION = '$table_func' and CODE_BEGIN='$proc1' and CODE_END='$proc2')); commit; "@ 
    $null = Invoke-SqlPlus -MessageOnFail 'Insert into su_edit_detail failed' -Query $myQuery; } } } 
    In this script I am passing variable on line # 6 and prioor to this I hard code following code but decide to use variable or PARAMETER in case I need to do changes
     I have csv file is located in C Drive which is mentioned in folowing code:
     foreach($file in dir $UCMCSVLoadLocation2 -Recurse -Include @("*.csv")) 
    Once I execute this powershell Insert statement get executed and dump all the data in table mentioned in code reside as follow:
     '{0,-60}{1,20}' -f "Insert TEEN PREGNANCY ICD9 AND ICD10 CODES into the su_edit_detail ",(Get-Date -Format yyyyMMdd:hhmmss); 
    $myQuery = @" SET PAGES 600; SET LINES 4000; SET ECHO ON; SET serveroutput on; WHENEVER sqlerror exit sql.sqlcode; 
    insert into SU_EDIT_DETAIL(EDIT_FUNCTION, TABLE_FUNCTION, CODE_FUNCTION, CODE_TYPE,CODE_BEGIN, CODE_END, EXCLUDE, INCLUDE_X, OP_NBR, TRANSCODE, VOID, YMDEFF, YMDEND, YMDTRANS) 
    select '$edit_func','$table_func','$code_func','DIAG','$proc1','$proc2',' ',' ','MIS', 'C',' ',20141001, 99991231, 20131120 from dual where not exists(select * from SU_EDIT_DETAIL where (EDIT_FUNCTION = '$edit_func' and TABLE_FUNCTION = '$table_func' and CODE_BEGIN='$proc1'
    and CODE_END='$proc2')); commit; 
    $null = Invoke-SqlPlus -MessageOnFail 'Insert into su_edit_detail
    Snapshot you are looking at failed at : "$params[1]"
    I am working on powershell script mentioned below $filename= $arg[0] $includePath = "$(Split-Path -Path $MyInvocation.MyCommand.Path -Parent | Split-Path -Parent)\include" . $includePath\utils.ps1; $AmisysConnectionStringName; Run-Job -JobName
    'ucmu073' { $files = @{ ICD10 = @{$Edit_Function = $params[1], $Table_Function = $params[2], $Code_Function = $params[3]}} } foreach($file in dir $UCMCSVLoadLocation2 -Recurse -Include @("*.csv")) #$files.GetEnumerator()) #$filename = $file_desc.Key
    $params[1] $params[2] $params[3] #$filePath = "C:\jobs\AA\DEV6\UCM\${filename}.csv" $importFile = Import-CSV $filePath foreach($item in $importFile) { $proc1 = $item.DIAG_NBR $proc2 = $item.DIAG_NBR # $ymdeff = $item.YMDEFF #$ymdend = $item.YMDEND
    #$ymdtrans = $item.YMDTRANS Write-Verbose "$proc1, $proc2" $currentDate = Get-Date -Format yyyyMMdd # ******************************************************************************* # * Insert codes and fees into the su_edit_detail. # *******************************************************************************
    '{0,-60}{1,20}' -f "Insert TEEN PREGNANCY ICD9 AND ICD10 CODES into the su_edit_detail ",(Get-Date -Format yyyyMMdd:hhmmss); $myQuery = @" SET PAGES 600; SET LINES 4000; SET ECHO ON; SET serveroutput on; WHENEVER sqlerror exit sql.sqlcode; insert
    into SU_EDIT_DETAIL(EDIT_FUNCTION, TABLE_FUNCTION, CODE_FUNCTION, CODE_TYPE,CODE_BEGIN, CODE_END, EXCLUDE, INCLUDE_X, OP_NBR, TRANSCODE, VOID, YMDEFF, YMDEND, YMDTRANS) select '$edit_func','$table_func','$code_func','DIAG','$proc1','$proc2',' ',' ','MIS',
    'C',' ',20141001, 99991231, 20131120 from dual where not exists(select * from SU_EDIT_DETAIL where (EDIT_FUNCTION = '$edit_func' and TABLE_FUNCTION = '$table_func' and CODE_BEGIN='$proc1' and CODE_END='$proc2')); commit; "@ $null = Invoke-SqlPlus -MessageOnFail
    'Insert into su_edit_detail failed' -Query $myQuery; } } } In this script I am passing variable on line # 6 and prioor to this I hard code following code but decide to use variable or PARAMETER in case I need to do changes I have csv file is located in C Drive
    which is mentioned in folowing code: foreach($file in dir $UCMCSVLoadLocation2 -Recurse -Include @("*.csv")) Once I execute this powershell Insert statement get executed and dump all the data in table mentioned in code reside as follow: '{0,-60}{1,20}'
    -f "Insert TEEN PREGNANCY ICD9 AND ICD10 CODES into the su_edit_detail ",(Get-Date -Format yyyyMMdd:hhmmss); $myQuery = @" SET PAGES 600; SET LINES 4000; SET ECHO ON; SET serveroutput on; WHENEVER sqlerror exit sql.sqlcode; insert into SU_EDIT_DETAIL(EDIT_FUNCTION,
    TABLE_FUNCTION, CODE_FUNCTION, CODE_TYPE,CODE_BEGIN, CODE_END, EXCLUDE, INCLUDE_X, OP_NBR, TRANSCODE, VOID, YMDEFF, YMDEND, YMDTRANS) select '$edit_func','$table_func','$code_func','DIAG','$proc1','$proc2',' ',' ','MIS', 'C',' ',20141001, 99991231, 20131120
    from dual where not exists(select * from SU_EDIT_DETAIL where (EDIT_FUNCTION = '$edit_func' and TABLE_FUNCTION = '$table_func' and CODE_BEGIN='$proc1' and CODE_END='$proc2')); commit; "@ $null = Invoke-SqlPlus -MessageOnFail 'Insert into su_edit_detail
    Snapshot you are looking at failed at : "$params[1]"
    failed' -Query $myQuery; ANY GREAT IDEA>>>>>>>>>>>>>>
    Vijay Patel
    I am new to this and try to  make difference
    I am getting error because I am not setting variable properly  can somebody help me with this.
    Thank you very much
    $filename= $args[0]
    $includePath = "$(Split-Path -Path $MyInvocation.MyCommand.Path -Parent | Split-Path -Parent)\include"
    . $includePath\utils.ps1;
    $AmisysConnectionStringName;
    Run-Job -JobName 'ucmu073' {
    foreach($file in dir $CodesetBulkLoadLocation -Recurse -Include @("*.csv"))
    #$files = @{
    #'ICD10' = @{ 'EDIT_FUNCTION'='UCM-REPT-TEEN-PREG-DIAG'; 'TABLE_FUNCTION'='UCM-REPT'; 'CODE_FUNCTION' = 'I0' }
    #foreach($file_desc in $files.GetEnumerator())
    $filename = $file_desc.Key
    $edit_func = $file_desc.Value.EDIT_FUNCTION
    $table_func = $file_desc.Value.TABLE_FUNCTION
    $code_func = $file_desc.Value.CODE_FUNCTION
    $filePath = "C:\jobs\AA\DEV6\UCM\${filename}.csv"
    $importFile = Import-CSV $filePath
    foreach($item in $importFile)
    $proc1 = $item.DIAG_NBR
    $proc2 = $item.DIAG_NBR
    # $ymdeff = $item.YMDEFF
    #$ymdend = $item.YMDEND
    #$ymdtrans = $item.YMDTRANS
    Write-Verbose "$proc1, $proc2"
    $currentDate = Get-Date -Format yyyyMMdd
    # * Insert codes and fees into the su_edit_detail.
    '{0,-60}{1,20}' -f "Insert TEEN PREGNANCY ICD9 AND ICD10 CODES into the su_edit_detail ",(Get-Date -Format yyyyMMdd:hhmmss);
    $myQuery = @"
    SET PAGES 600;
    SET LINES 4000;
    SET ECHO ON;
    SET serveroutput on;
    WHENEVER sqlerror exit sql.sqlcode;
    insert into SU_EDIT_DETAIL(EDIT_FUNCTION, TABLE_FUNCTION, CODE_FUNCTION, CODE_TYPE,CODE_BEGIN, CODE_END, EXCLUDE, INCLUDE_X, OP_NBR, TRANSCODE, VOID, YMDEFF, YMDEND, YMDTRANS)
    select '$edit_func','$table_func','$code_func','DIAG','$proc1','$proc2',' ',' ','MIS', 'C',' ',20141001, 99991231, 20131120
    from dual where not exists(select * from SU_EDIT_DETAIL where (EDIT_FUNCTION = '$edit_func' and TABLE_FUNCTION = '$table_func' and CODE_BEGIN='$proc1' and CODE_END='$proc2'));
    commit;
    $null = Invoke-SqlPlus -MessageOnFail 'Insert into su_edit_detail failed' -Query $myQuery;

    Here is what it appears you are trying to do but, unfortunately, PowerShell does not work like this.
    $currentDate = Get-Date -Format yyyyMMdd
    function BuildQuery{
    SET PAGES 600;
    SET LINES 4000;
    SET ECHO ON;
    SET serveroutput on;
    WHENEVER sqlerror exit sql.sqlcode;
    '{0,-60}{1,20}' -f "Insert TEEN PREGNANCY ICD9 AND ICD10 CODES into the su_edit_detail ",(Get-Date -Format yyyyMMdd:hhmmss);
    insert into SU_EDIT_DETAIL(EDIT_FUNCTION, TABLE_FUNCTION, CODE_FUNCTION, CODE_TYPE,CODE_BEGIN, CODE_END, EXCLUDE, INCLUDE_X, OP_NBR, TRANSCODE, VOID, YMDEFF, YMDEND, YMDTRANS)
    select '$edit_func','$table_func','$code_func','DIAG','$proc1','$proc2',' ',' ','MIS', 'C',' ',20141001, 99991231, 20131120
    from dual where not exists(select * from SU_EDIT_DETAIL where (EDIT_FUNCTION = '$edit_func' and TABLE_FUNCTION = '$table_func' and CODE_BEGIN='$proc1' and CODE_END='$proc2'));
    commit;
    $filename= $args[0]
    $includePath = "$(Split-Path -Path $MyInvocation.MyCommand.Path -Parent | Split-Path -Parent)\include"
    . $includePath\utils.ps1;
    $AmisysConnectionStringName;
    Run-Job -JobName 'ucmu073' {
    foreach($file in (dir $CodesetBulkLoadLocation -Recurse -Include *.csv){
    $filename = $file_desc.Key
    $edit_func = $file_desc.Value.EDIT_FUNCTION
    $table_func = $file_desc.Value.TABLE_FUNCTION
    $code_func = $file_desc.Value.CODE_FUNCTION
    $filePath = "C:\jobs\AA\DEV6\UCM\${filename}.csv"
    $importFile = Import-CSV $filePath
    foreach($item in $importFile){
    $proc1 = $item.DIAG_NBR
    $proc2 = $item.DIAG_NBR
    Write-Verbose "$proc1, $proc2"
    Invoke-SqlPlus -MessageOnFail 'Insert into su_edit_detail failed' -Query BuildQuery
    ¯\_(ツ)_/¯

  • Powershell New-object Command not reconized am i missing a module?

    I want to configure high trusted app for app dev in SharePoint, end to do so i need first to insert some commands in the powershell editor like :
        $publicCertPath = "C:\Certs\HighTrustSampleCert.cer" 
        $certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($publicCertPath)
    I am using windows PowerShell on Windows Server 2012 R2 which includes Windows PowerShell 4 that includes by default the new-object cmd-let... I don't understand though, why doesn't my system recognize that command .... Each time i am getting the following
    error : New-Object : The term 'New-Object' is not recognized as the name of a cmdlet.
    Every time i open power shell it displays me the following error :
    *select : The term 'Select-Object' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or
    if a path was included, verify that the path is correct and try again.
    At C:\Program Files\Common Files\Microsoft Shared\Web Server
    Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1:1 char:16
    + $ver = $host | select version
    +                ~~~~~~
        + CategoryInfo          : ObjectNotFound: (Select-Object:String) [], Comma
       ndNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Set-location : The term 'Set-location' is not recognized as the name of a
    cmdlet, function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and try again
    At C:\Program Files\Common Files\Microsoft Shared\Web Server
    Extensions\15\CONFIG\POWERSHELL\Registration\SharePoint.ps1:4 char:1
    + Set-location $home
    + ~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Set-location:String) [], Comman
       dNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException*
    I thought that was normal until today... does it have any relation with the error?
    And here is the hole (new-object) exception stack:
    *New-Object : The term 'New-Object' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or
    if a path was included, verify that the path is correct and try again.
    At line:1 char:16
    + $certificate = New-Object
    System.Security.Cryptography.X509Certificates.X509Cert ...
    +                ~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (New-Object:String) [], CommandN
       otFoundException
        + FullyQualifiedErrorId : CommandNotFoundException*
    Can anyone help me please?

    the new-object cmdlet is not defined in a module.
    Try this:
    reboot your computer
    start the powershell console
    type a new-object command without parameter
    this is what happens when I do that:
    PS C:\Users\Al> new-object
    cmdlet New-Object at command pipeline position 1
    Supply values for the following parameters:
    TypeName:
    what happens on your system?
    Al Dunbar 
    Aren't you able to see a simple semantic error?
    I told you almost never post any technical text, just vague and imprecise generalities.
    When you try to post something technical, you post a rubbishellian text like this one, typical of a decrepit old vb scripter 101% PowerShell ignorant.
    Certainly, you are the worst rubbishellian I met in this forum.
    @admins: will you please, inhibit the reply button for this rubbishellian forum member? He should just ask questions; never answer any of them.
    Your post above is off-topic in this thread, as it is a personal attack on me that contains no information likely to actually help the OP with his problem.
    I was not aware that you are the arbiter here of what is appropriate to post, especially given your collection of abusive posts and banned accounts.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • Powershell MA (Microsoft) missing documentation

    The Windows PowerShell Connector for FIM 2010 R2 Technical Reference webpage (http://technet.microsoft.com/en-us/library/dn640417(v=ws.10).aspx) says:
    To simplify the creation of Schema, the FIMPowerShellConnectorModule Windows PowerShell Module provided in Appendix A includes the following cmdlets:
    New-FIMPSConnectorSchema
    New-FIMPSConnectorSchemaType
    Add-FIMPSConnectorSchemaAttribute
    But I can't find "Appendix A" (or any other appendix) anywhere.
    Also, I've installed the MSI package, and I see the "Powershell (Microsoft)" MA type in the dropdown, but when I try to create one, I get an error that the schema can't be loaded because the anchor value can't be a reference or Boolean and that
    a multivalue attribute can't be a Boolean.  But I've defined no anchor (or any other attributes!).
    The above error has been reported in a number of places, but no one has posted an explanation or a solution.
    Help?  Please?
    Ed Bell - Specialist, Network Services, Convergys

    Agreed, same problems. I'm wondering if it's worth cutting over from Soren's powershell MA that's I've been using for almost a year now. 
    MICROSOFT - fix your documentation please. Neither sample example is usable as a walk-through at this point.
    http://social.technet.microsoft.com/wiki/contents/articles/23647.windows-powershell-connector-for-fim-2010-r2-sample-connector-collection.aspx

  • Remote PowerShell Error: Value cannot be null

    I am trying to run commands on our exchange server from another server, and I keep running into this problem regard less of the command I run.  For example I am trying to run the New-MailboxExportRequest and I alway get the error "Value cannot be null."
     If I run the command from the exchange server console it works fine.
    the client machine is Server 2008 (x86) and the server is Server 2008 R2 (x64).
    Here is the exact log of what I am doing
    Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.
    PS C:\Users\Administrator> Enter-PSSession -computerName SAM
    [sam]: PS C:\Users\Administrator\Documents> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
    [sam]: PS C:\Users\Administrator\Documents> new-mailboxexportRequest
    cmdlet New-MailboxExportRequest at command pipeline position 1
    Supply values for the following parameters:
    Mailbox: eric
    FilePath: C:\Test\eric.pst
    Value cannot be null.
    Parameter name: parameters
    + CategoryInfo :
    + FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.Exchange.Management.RecipientTasks.NewMailboxExportRequest
    [sam]: PS C:\Users\Administrator\Documents>
    It seems that almost all the exchange commands do not work using this connection method.  Can any one tell me what I am missing?

    Have the remote powershell ever worked before?
    Have you tried to use the procedure in the article below to connect the remote exchange server?
    Connect Remote Exchange Management Shell to an Exchange Server
    James Luo
    TechNet Subscriber Support (http://technet.microsoft.com/en-us/subscriptions/ms788697.aspx)
    If you have any feedback on our support, please contact [email protected]

Maybe you are looking for

  • Change Selected Property of a Checkbox

    I'm trying to set the selected property of a checkbox generated by the Repeater component. The checkbox has an ID of ccb. I know I can access them using index notation ie. ccb[1].selected = true; - that works fine. However, when I put in a for loop a

  • GWI - All Business Transactions by Process Type (MESG) - Multiple Types

    Dear sir or madam, We have implemented SAP not 686880 to synchronize only one process type to Outlook (appointment). Currently, we have the requirement of the sales department that also tasks should be synchronized to Outlook. Since we are not using

  • Display a modal window in a single cocoa app

    Hi, I have a single cocoa app(non document base), I need to display another window modally, any hint how to do this? thanks, Angelo

  • Price List including TAX

    Hello experts I have a Price List that includes Tax. At present, if I raise an Invoice, SAP will automatically add Tax to each line however, what I would like to achieve is the following: 1. No Tax should be added. 2. The Price List amount should be

  • File Types and PSE7

    I can't double click on files any more and have them open in PSE7 editor. It started about two days ago. I've gone to the control panel and it still says PSE7 (although I did notice the PSD files say PSE7 editor and I it doesn't give me a choice of t