Write PowerShell commands in C#

Hi,
I want to invoke powershell commands using C# from my wcf service. However, I keep getting the following error:
An exception of type 'System.Management.Automation.ParameterBindingException' occurred in System.Management.Automation.dll but was not handled in user code
The powershell script that I want to convert into C#:
Get-VM -Name TestVM | FT State
Here's what I wrote in my WCF Service in C#:
PowerShell ps = PowerShell.Create();
ps.AddCommand("Get-VM");
ps.AddParameter("Name", "TestVM");
ps.AddParameter("Format-Table");
ps.AddParameter("State");
var result = ps.Invoke();
Can anyone point to me where I went wrong with the codings?
Thanks. 

After trying out for some time, I've managed to figure how to invoke it the way I want to.
Here's the code of my WCF service:
getStatus.VmName = "TestVM";
string vmState = "";
if (getStatus.VmName != "")
PowerShell ps = PowerShell.Create();
ps.AddCommand("Get-VM");
ps.AddParameter("Name", getStatus.VmName.Trim());
var result = ps.Invoke();
foreach (PSObject r in result)
VirtualMachineDetails vmInfo = new VirtualMachineDetails();
vmInfo.VmStatus = r.Members["State"].Value.ToString();
vmState = vmInfo.VmStatus;
return vmState;
It's quite simple actually it's just that I'm new to writing powershell codes in C#, thus it took much longer time to figure this out. Hope this will help others out there.

Similar Messages

  • How do I write a command in a .batch file written in NOTEPAD to run a powershell command?

    How do I write a command in a .batch file written in NOTEPAD to run a powershell command?
    Example:
    powershell -Command "& {Update-Help;}"
    would this be a correct command to put in a .batch file to update help information in powershell.
    All I want to know is how to write a windows powershell command in a .batch file.
    Multi-Commands
    Single-Commands
    Charles Wright

    Hi,
    You can separate multiple commands with a semicolon (;).
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Error while Seq vlc in powershell command line.

    Hi Team,
    when i am trying to seq Vlc i got below error in power shell.
    i have entered below command lines in powershell
    1. cd c:\install
    2. Set-ExecutionPolicy Unrestricted
    3. New-AppvSequencerPackage -FullLoad -Installer "C:\Install\vlc-2.1.3-win32.exe" -Name "Unknown_VLC_2.1.3_01_W7_32_A" -Pa
    th C:\Packages -PrimaryVirtualApplicationDirectory "C:\Windows" -TemplateFilePath .\AppV5SequencerTemplate.appvt -Verbo
    se
    after it's called "C:\Install\vlc-2.1.3-win32.exe", i did default install and clicked close button.
    after 5 mint's i got below error.
    could you please help me to solve.
    1. AppV5SequencerTemplate.appvt file present in c:\installer folder
    2. c:\packages folder created
    Thanks in Advance :)
    Ramesh
    PS C:\Install> New-AppvSequencerPackage -FullLoad -Installer "C:\Install\vlc-2.1.3-win32.exe" -Name "Unknown_VLC_2.1.3_01_W7_32_A" -Pa
    th C:\Packages -PrimaryVirtualApplicationDirectory "C:\Windows" -TemplateFilePath .\AppV5SequencerTemplate.appvt -Verbo
    se
    Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indi
    cation that other memory is corrupt.
    at PE.ComputeMinFileRanges(PE* )
    at ResolveDependencies(IPackageFile file, IEnumerable`1 files, Func`4 fnGetDependencyPathFromName, Func`2 fnGetLocalP
    athOfPackageFile, HashSet`1 dependencies, HashSet`1 visited)
    at Microsoft.ApplicationVirtualization.Packaging.PEScanner.BuildDependencies(IEnumerable`1 allPackageFiles, Func`2 pr
    edicate, Func`4 fnGetDependencyPathFromName, Func`2 fnGetLocalPathOfPackageFile)
    at Microsoft.ApplicationVirtualization.Packaging.StaticDependencyPackagingSubsystem.<>c__DisplayClass8.<.ctor>b__0(Ob
    ject sender, CommonPreEventArgs args)
    at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
    at Microsoft.ApplicationVirtualization.Packaging.PackagingEngine.OnFinalizePackage(Func`1 writerFactory)
    at Microsoft.ApplicationVirtualization.Packaging.PackagingEngine.<>c__DisplayClass18.<FinalizePackage>b__12()
    at Microsoft.ApplicationVirtualization.Packaging.WithAppCorruptionCheck.Execute(Action execute, Action`1 logCorruptio
    n)
    at Microsoft.ApplicationVirtualization.Packaging.WithAppCorruptionCheck.Execute(Action execute)
    at Microsoft.ApplicationVirtualization.Packaging.PackagingEngine.<>c__DisplayClass18.<FinalizePackage>b__11()
    at Microsoft.ApplicationVirtualization.Packaging.ExceptionGuard`1.Guard(Action logStart, Action execute, Action logEn
    d, Action`1 exceptionAction)
    at Microsoft.ApplicationVirtualization.Packaging.PackagingEngine.FinalizePackage(Func`1 writerFactory)
    at Microsoft.ApplicationVirtualization.Packaging.Packager.FinalizePackage(IPackageFiles packageFiles, String manifest
    Path, String registryHivePath, String streamMapPath, String packageHistoryPath, String installPath, String installShortP
    ath, String packagePath, CompressionOption compression, Predicate`1 addFileToPublishingFeatureBlock, PackagingEngineType
    engineType, PackagerParameters packageParameters)
    at Microsoft.ApplicationVirtualization.Packaging.Sequencing.PackagerAdapter.FinalizePackage(IPackageFiles packageFile
    s, String manifestPath, String registryHivePath, String streamMapPath, String packageHistoryPath, String installPath, St
    ring packagePath, CompressionOption compression, PackagerParameters packagerParameters)
    at Microsoft.ApplicationVirtualization.Packaging.Sequencing.PackagerOrchestrator.FinalizePackage(String streamMapPath
    , String packagePath, String manifestPath, String registryHivePath, String packageHistoryPath, String installPath, Compr
    essionOption compression, Boolean toAppendVersionNumberToFileName, PackagerParameters packagerParameters)
    at Microsoft.AppV.Modernizer.Cmdlets.NewAppvSequencerPackage.CreatePackageViaInstaller(String packageName, String out
    putDirectoryPath, String primaryApplicationVirtualDirectory, String installer, String templatePath, Boolean fullLoad, Fu
    nc`1 fnSequencerFactory, Func`2 fnMonitoringSessionManagerFactory, Func`1 fnSequencerStateFactory, Func`2 fnTaskScannerA
    dapterFactory, Func`2 fnPackagerOrchestratorFactory, Func`1 fnSequencerTemplateFactory, Func`2 fnExclusionListFactory, A
    ction`1 fnWait, Action fnConfigurePrivileges, Func`2 fnOutputDirectoryExists, Func`2 fnOutputSubdirExists, Action`1 fnCr
    eateDirectory)
    at Microsoft.AppV.Modernizer.Cmdlets.NewAppvSequencerPackage.CreatePackageViaInstaller(String packageName, String out
    putDirectoryPath, String primaryApplicationVirtualDirectory, String installer, String templatePath, Boolean fullLoad)
    at Microsoft.AppV.Modernizer.Cmdlets.NewAppvSequencerPackage.NewPackage()
    at Microsoft.AppV.Modernizer.Cmdlets.NewAppvSequencerPackage.<ProcessRecord>b__1()
    at Microsoft.AppV.Modernizer.Cmdlets.ExceptionGuard.Guard(Action logStart, Action execute, Action logEnd, Action`1 er
    rorAction)
    at Microsoft.AppV.Modernizer.Cmdlets.NewAppvSequencerPackage.ProcessRecord()
    at System.Management.Automation.CommandProcessor.ProcessRecord()
    at System.Management.Automation.CommandProcessorBase.DoExecute()
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorR
    esults, Boolean enumerate)
    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInterna
    l[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcCo
    ntext)
    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
    at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean crea
    teLocalScope, Dictionary`2 functionsToDefine, List`1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Obj
    ect dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
    at System.Management.Automation.ScriptBlock.<>c__DisplayClassa.<InvokeWithPipe>b__8()
    at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action)
    at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, Dictionary`2 functionsToDefine, Lis
    t`1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis,
    Pipe outputPipe, InvocationInfo invocationInfo, Object[] args)
    at System.Management.Automation.ScriptBlock.InvokeUsingCmdlet(Cmdlet contextCmdlet, Boolean useLocalScope, ErrorHandl
    ingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Object[] args)
    at Microsoft.PowerShell.Commands.InvokeExpressionCommand.ProcessRecord()
    at System.Management.Automation.CommandProcessor.ProcessRecord()
    at System.Management.Automation.CommandProcessorBase.DoExecute()
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorR
    esults, Boolean enumerate)
    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInterna
    l[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcCo
    ntext)
    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
    at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object in
    putToProcess)
    at System.Management.Automation.CommandProcessorBase.DoComplete()
    at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstr
    eamCommandsToStop)
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorR
    esults, Boolean enumerate)
    at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInterna
    l[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcCo
    ntext)
    at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
    at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
    at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object in
    putToProcess)
    at System.Management.Automation.CommandProcessorBase.DoComplete()
    at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstr
    eamCommandsToStop)
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorR
    esults, Boolean enumerate)
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
    at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object
    state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, B
    oolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    PS C:\Install>

    Thanks for your replay
    i have re- seq'd it's working..
    Thanks
    Er Reddy

  • Run powershell commands on a bat file

    Hello,
    I can call powershell on command line as below:
    C:\>echo I am in Command Shell
    I am in Command Shell
    C:\>powershell
    Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.
    PS C:\> Write-Host I am in Powershell
    I am in Powershell
    PS C:\> exit
    C:\>echo I returned to Command Shell
    I returned to Command Shell
    But I want to create a bat file and run these commands in bat file. To do this, I copied and pasted same codes to Test.bat file:
    echo I am in Command Shell
    powershell
    Write-Host I am in Powershell
    exit
    echo I returned to Command Shell
    But after "powershell" command nothing worked as below:
    C:\>.\Test.bat
    C:\>echo I am in Command Shell
    I am in Command Shell
    C:\>powershell
    Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.
    PS C:\>
    I want this output:
    I am in Command Shell
    I am in Powershell
    I returned to Command Shell
    How can I handle this problem.
    PS: I don't want to use powershell file (*.ps1).
    Thanks

    In my Test.bat file there are some commands. My Test.bat file is sth like this:
    @echo off
    echo I am in Command Shell
    powershell.exe
    Write-Host I am in Powershell
    $Var = "Some words"
    Write-Host My ID: $Id, String: $Var
    exit
    echo I returned to Command Shell
    There are other different commands, such as importing modules or setting variables or configuring computer settings,.... So, I think "powershell -command" is not applicable. 
    In brief;
    Above codes work in command line.
    But when I use same codes in a batch file, nothing works in powershell. Result is sth line this:
    C:\>Test.bat
    I am in Command Shell
    Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.
    PS C:\>

  • Powershell command is not working

    Hi Guys,
    I am just trying to add a library template through powershell and it is not working. Any idea where thing might be going wrong.
    here is the code snippet.
    $sourceFile = "C:\mystuff\Library.stp"
    $templateName = "Library.stp"
    AddListTemplate -siteUrl "https://mysite.com/domain1/testsite" -fileServerFileName $sourceFile -listTemplateFileName $templateName
    The term 'AddListTemplate' 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
    + AddListTemplate <<<<  -siteUrl "https://mysite.com/domain1/testsite" -fileServerFileName $sourceFile -listTemplateFileName $templateName
        + CategoryInfo          : ObjectNotFound: (AddListTemplate:String) [], Com
       mandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Any help would be greatly appreciated.
    Many Thanks in advance.

    Hi Traveller,
    the command AddListTemplate is not a recognized command. Make sure you write the command correctly.
    Should it have been Add-ListTemplate?
    Do you need to load a module / script first?
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Execute powershell command (new-object -comObject ...) in management pack

    Hello everyone
    I have a COM Object that want to use it in my management pack. When I write the powershell command "new-object -comObject ... " to create it outside of MP and in a ps1 file it works without any error. However when I write it in my MP, this
    error is showed in event viewer: "Retrieving the COM class factory for component with CLSID {clsID} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))."
    I have to mention that when I use vb script in my MP and using "CreateObject()", I don't have any problem.
    How can I use "new-object -comObject ... " in my management pack?
    thank you all
    Alireza

    Hi Marthijn,
    Actually I don't have any problem with powershell in my management packs. For example I can use "MOM.ScriptAPI"
    to create $oBag and return it to next module. My problem is only with that custom COM object. Interesting thing is that, it
    works fine when I create it in powershell file outside of MP, but when I create it in my MP, that error occures.
    thank you so much
    Alireza

  • Powershell command to add users to list

    I am looking for a powershell command to add an Active Directory user to a list and set the permission level on the list, e.g. read or contribute.
    Ideally, the script should check if the list is inheriting permissions from the parent and if so, remove the inheritance, clear the list of users and add the specified users.
    Any ideas?

    I haven't tested this but the logic is like below
    $spweb = Get-SPWeb -Identity ("URL")
    $splist = $spweb.Lists['List Name']
    if($splist.Permissions.Inherited)
    Write-Host "Let's Break the inhertiance..."
    $splist.BreakRoleInheritance($true , $true)
    #Role assignment
    $role = $splist.RoleAssignments["Read"]
    #Specific User
    $account = $spweb.EnsureUser('Domain\User')
    #remove assignment
    $assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($account)
    $assignment.RoleDefinitionBindings.Remove($role)
    $splist.RoleAssignments.Remove($assignment)$split.Update()
    else
    $role = $splist.RoleAssignments["Read"]
    $account = $spweb.EnsureUser('Domain\User')
    $assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($account)
    $assignment.RoleDefinitionBindings.Add($role)
    $splist.RoleAssignments.Add($assignment)
    $splist.Update()
    Regards Chen V [MCTS SharePoint 2010]

  • Powershell command to migrate Exchange 2007 mailbox databases with a legacy name, & import them into a new 2007 instance, with a new name.

    Hi All. I am currently at the later stage of provisioning a new CCR Exchange 2007 migration (to
    virtualise old Exchange 2007 hardware) for 5,000 users & have a quick question.
    I have created around 15 newly named storage groups, & have named 1 new DB per group, with the same name (let's say New-DB-1), residing within them.  The problem I have, is the old legacy DB's have different names (let's say Old-DB-1) & I need
    to import them into the new storage groups, to match the new names. So far I can import/export between old & new OK if both old & new DB names\folders etc. names marry up perfectly, but are unable to if there not the same. Does anyone have any thoughts
    on how best to tackle this, as this is one of the final hurdles stopping the migration? Many Thanks, John 

    Hi All
    Many Thanks for the feedback.
    The terminology 'migrate' was used based around the fact I will be decommissioning the old 2007 physical environment. This is after moving all DB's over to the new newly created Virtual environment that will host all roles.
    The solution I ended up using yesterday, was the following:
    1) Dismounted the relevant named DB (NEWDB) in the new environment.
    2) I then ticked the 'This database can be overwritten by a restore option' box.
    3) Copied over the old named DB (OLDDB) to the same location, & overwrote using the new name (NEWDB).
    4) Re-mounted the (NEWDB).
    5) Ran the following 2 PowerShell commands:
     Get-mailbox –database OLDDB | move-mailbox –targetdatabase NEWDB -configurationonly:$true
     Get-MailboxDatabase NEWDB | ResetSearchIndex.ps1 -force
    6) Checked to make sure the clients were working ok, in the now the new (NEWDB) environment.
    Rich: Many thanks for your PS script, which I will test with future DB moves & provide feedback
    J
    John.

  • How to get Systemstate Backup size using PowerShell command in Windows 2008 R2

    Hi,
    We using WBSummary command to get completed backup status.
    I need to find how much data is backed up  using powerShell command .
    Is there any way to get the details , i can see the GUI but no in command.
    Please advise
    Regards Gopi K

    Hi,
    You mentioned that you can see the system state backup size in the GUI. Does the backup size mean the amount of date transferred?
    It seems that there is no such a PowerShell to get Systemstate Backup size. You may need to you need a PowerShell scripts to do this work.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ITCG
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Retrieve all pages in a site collection using powershell command

    Hi all,
    I need to retrieve all pages in a site collection and i wanted to display it in a csv file using powershell command.Please help.
    Regards,
    Praveen

    Hi Praveen,
    Here are two blogs would be helpful:
    PowerShell script to Enumerate Sites, Sub-sites and print them in a .csv file
    http://www.sharepointfix.com/2012/02/powershell-script-to-enumerate-sites.html
    Powershell to Loop through all SharePoint sites and pages
    https://tjendarta.wordpress.com/2013/03/19/powershell-to-loop-through-all-sharepoint-sites-and-pages/
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to write sql command in batch file

    hi,
    i m using oracle 9i on windows. i want to know how can i write sql command on batch file. i want to use a batch file to use sql command like shutdowm & startup command and any select command too.
    so plz tell how can i do it ?
    thxs

    superdba wrote:
    thxs u all , i got it at i wanted to do.
    thaks u all for yr precious time.
    thxsYou've 67 questions with 63 UNanswered. Please mark this question as "answered" and give points to the users whose answer you accept as "helpful" or "correct"
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the Vhd capacity is 20 gb in size, vmm 2012 r2

    Hi All,
    TotalVHDCapacity attribute is returning zero in "Get-SCVMTemplate | select Name, TotalVhdCapacity" powershell command though the template has Vhd capacity is 20 gb in size, vmm 2012 r2. I can create VM using this template too.
    For other templates it is returning correct value though.
    Can anyone help us understanding the root cause and the solution too.
    Thanks in advance.
    Debabrata

    I booted this drive from another computer (Asrock M3A770DE mobo) and works fine, speed with dd was ~100MB/s
    I also update bios on my first computer with Intel D945GSEJT (there is selected AHCI mode) still the same transfers with dd (~10Mb/s)
    I have no idea what to do with it now
    EDIT:
    More tests with other hdd (Samsung HD502IJ), dd on mounted NTFS partition:
    Intel D945GSEJT booted from Archlinux iso:
    hdparm: ~75 MB/s
    dd: ~10 MB/s
    Intel D945GSEJT booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
    hdparm: ~60 MB/s
    dd: ~10 MB/s
    Asrock M3A770DE booted from Archlinux iso:
    hdparm: ~87 MB/s
    dd: ~76 MB/s
    Asrock M3A770DE booted from Archlinux iso, HDD connected to PCI SATA controller (Promise 378):
    hdparm: ~81MB/s
    dd: ~76 MB/s
    What is broken on D945GSEJT?
    Last edited by miskoala (2012-03-30 13:47:23)

  • Powershell Command to permanently delete items in ALL users Deleted Items folder older than X days.

    Does anyone know a powershell command that can be run on Exchange 2010 SP1 that will permanently delete mail in the deleted items folder older than X days for ALL users in a specific database? This should include any user created subfolders in deleted items
    also.
    I know that seems bizarre to have user created subfolders in deleted items but we have found that users have discovered that if they create subfolders then their deleted items dont get purged at the regular retention period time.
    Thank You.

    Hi,
    For Exchange 2010 SP1, we can use search-mailbox and new-mailboxexportrequest to delete message in certain folder.
    Understanding Exchange Search
    http://technet.microsoft.com/en-us/library/bb232132.aspx
    Xiu Zhang
    TechNet Community Support

  • I need a powershell command to replace unicode chars in a file name to a blank space

    Can anyone provide me with a powershell command which will search and replace a specific unicode character in a file name to just a blank space?
    Thanks

    Hi Roadster198,
    In addition, if you want to search and rename the text files under a folder, please also check this script:
    Get-ChildItem -Path d:\test1\1\*.txt -Recurse| where{$_.name -like "*ф*"}|rename-item -newname { $_.name -replace "ф"," " }
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • Can't save Cisco ASA configuration in GNS3 via write memory command

    Hi all,
    I’m having a problem to save Cisco ASA configuration in GNS3 via write memory command.
       ciscoasa(config)# wr mem
       Building configuration…
       Cryptochecksum: c066a7ab b5b9071e bb5ee1f6 2d93be53
       %Error copying system:/running-config (Not enough space on device)
       Error executing command
       [FAILED]
       ciscoasa(config)#
    Here are the details of the lab setup.
    PC DETAILS:
       Windows 7 Enterprise SP1 64bit
       GNS3 v0.8.6 all-in-one (installer for 32-bit and 64-bit which includes Dynamips, Qemu/Pemu, Putty, VPCS, WinPCAP and Wireshark)
    ASA DETAILS:
       13,279,888 asa802-k8.bin.unpacked.initrd
       1,095,856 asa802-k8.bin.unpacked.vmlinuz
    Please advise. Thanks in advance.
    http://firewallengineer.wordpress.com/2014/02/19/problem-cisco-asa-in-gns3-error-copying-systemrunning-config-not-enough-space-on-device/

    instead of this:
    To create a flash file
    cd "C:\Program Files\GNS3\qemu-2.1.0"
    qemu-img.exe create c:\FLASH 256M
    try this:
    To create a flash file
    cd "C:\Program Files\GNS3\qemu-2.1.0"
    qemu-img.exe create c:\User\usuario\GNS3\FLASH 256M
    Let me know if is helpfull.

Maybe you are looking for

  • How to get all the windows ?

    Hi all, I created a timer which detects inactivity in the first form launched by the forms runtime shortcut : when-new-form-instance : declare hWind NUMBER; CheckTimer TIMER; begin hWind := get_window_property(FORMS_MDI_WINDOW,WINDOW_HANDLE); Win_API

  • Export Data Sources DEV Transport to Acceptance

    Hi Friends I am having a Export Data Source 80VELEXT created in Development System. When I transport that Datasource to Acceptance. It is not getting activated. I checked in RSLOGSYSMAP Table. I do not see the DB4CLNT120 --AB4CLNT110 Check mark. Is i

  • U.S. HRFORMS PDF Payslip

    Hello. I'm looking for a productive version of the Adobe (PDF) U.S. payslip. The note 769797 from year 2004 is talking about a sample payslip SAP_PAYSLIP_US2 for pilot customer. I tried this sample payslip, but the YTD amounts are missing on this sam

  • Sharing faces between libraries

    Hello, I have 2 Macs with iPhoto installed. Because I cannot access both Macs all the time, I started naming different faces on these different Macs. After spending hours doing this (because face recognition is actually quite bad), I thought I would

  • Two-way video chat with other (audio-only) participants?

    Is it possible to have a five-way chat in iChat with . - myself and one other participant via video, and . - three other participants via audio only? I know there's an option for one-way video conferencing, where only one person in a conference has v