Compliance Settings & Powershell Commands

I have started using Configuration Baseline's and I followed a blog on how to add an inbound firewall rules via a Configuration Item using Powershell.  The Powershell script is using the commands 'Get-NetFirewallRule'
& 'New-NetFirewallRule' which work fine for my Windows 8 clients however those commands are not available for the version of powershell in the Win 7 clients.  The post was not OS specific and such it answer how you would use this for win 7 devices?
 Maybe I'm missing something and those commands would work on a Win 7 device...?
I'm hopefully making a good assumption that all Win 7 devices would have to have Import-Module NetSecurity' run in Powershell before we are able to deploy that Configuration Baseline calling those commands?  Am I
off here?  Is there a better way to go about this?  Or would I have to make two Configuration Item's by OS.... (Win 7 and Win8)? 

Does your Windows 7 machines have WMF4 installed? I mean this:
http://www.microsoft.com/en-us/download/details.aspx?id=40855
As stated here
http://technet.microsoft.com/en-us/library/jj554860.aspx, the command Get-NewFirewallRule applies to Windows 8.1,
Windows PowerShell 4.0, Windows Server 2012 R2. With WMF4, you'll install PS4 to your Windows 7 machines. After that you can try your compliance settings again.
Some info on deploying WMF4 can be found through these links:
http://blogs.msdn.com/b/powershell/archive/2013/10/29/wmf-4-0-known-issue-partial-installation-without-net-framework-4-5.aspx
http://blogs.msdn.com/b/powershell/archive/2009/06/25/detection-logic-poweshell-installation.aspx
What you basically need is two applications, one for .NET4.5 and one for WMF4. Configure .NET4.5 as dependency for WMF4 and deploy WMF4.

Similar Messages

  • Set the "Schedule compliance evaluation" schedule in the default client agent settings (compliance settings) using powershell?

    I am having trouble figuring this out.  using the Set-CMClientSettings is it possible to modify the "Compliance Settings" "Schedule compliance evaluation" schedule.  The default is every 7 days and I want to be able to modify
    that.
    Thanks
    Eric

    I just checked and I don't see a way to do this even with the R2 CU1 cmdlets. I would recommend filing a feedback on Connect regarding this here:
    https://connect.microsoft.com/ConfigurationManagervnext
    Check out my Configuration Manager blog at http://aka.ms/ameltzer

  • How could I create a Compliance Settings that enforces NetBIOS over TCP/IP?

    Hello Everyone,
    I need to be able to enforce NetBIOS over TCP/IP on some collections. I've created a batch script  with one line that disable NetBIOS over TCP/IP but I also need to make sure this is enforced. How could I do the enforcement using Compliance Settings?
    This is the line I use to disable it;
    "wmic nicconfig where (TcpipNetbiosOptions!=Null and TcpipNetbiosOptions!=2) call SetTcpipNetbios 2"
    Thank you everyone in advance for any help

    I could probably help you with a CI for discovery and remediation, but I need (or you need to define) an additional parameter.
    If I were to run this as a powershell discovery script:
    $adapter=(gwmi win32_networkadapterconfiguration | where {$_.ipenabled -eq "1"})
    Foreach ($nic in $adapter) {
    write-host $nic.TcpIPNetBiosOptions
    what's echo'd out (in my testing) is a 0, a 1 , or a 2.
    0 means "default--use what your dhcp is offering"
    1 = enabled
    2 = disabled.
    So... from your standpoint... is a 0 or 1, (either one) acceptable?  or is only a value of 1, a hard-coded at the client (not whatever the default is from dhcp) the only acceptable value?
    fyi, the remediation script, if 1 is the only acceptable answer, would probably be this:
    $adapter=(gwmi win32_networkadapterconfiguration | where {$_.ipenabled -eq "1"})
    Foreach ($nic in $adapter) {
    $adapter.settcpipnetbios(1)
    Standardize. Simplify. Automate.

  • 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:\>

  • 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

  • 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]

  • 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

  • PowerShell command To configure Access Service 2010 in sharepoint 2013 server

    HI ,
    can any body give reference for Powershell command for
    Access Service 2010
    I am currently able to run powershell command for
    Access Service .
    But in sharepoint 2013,Access Service 2010 is a new service, but i am not able to see any refernce blog for command.

    Hi,
    According to your description, you want to configure Access Service 2010 in SharePoint 2013 server by using a Windows PowerShell.
    Take a look at an articles about configuring services and service applications in SharePoint 2013:
    http://technet.microsoft.com/en-us/library/ee794878(v=office.15).aspx
    Updates on how to do a lot of these (include
    configure Access Service 2010 ) with PowerShell haven't really been released yet. 
    Here is an article about configuring a service application by using a Windows PowerShell script (SharePoint Server 2010), you can use as a reference:
    http://technet.microsoft.com/en-us/library/gg983005(v=office.14).aspx
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • How to add user in administrator group of project server 2010 with powershell command ?

    I want to add one user in Administrator group of Project Server .
    Please let me know how to do this through power shell command.

    Hello,
    You would need to use the PSI in your PowerShell commands. Here is a .Net example to get you started, convert this to PowerShell:
    http://blogs.msdn.com/b/ajjose/archive/2013/05/24/creating-a-project-server-user-and-adding-user-to-a-group-through-psi.aspx
    Examples of PowerShell and the PSI can be found here in some of the scripts:
    http://gallery.technet.microsoft.com/scriptcenter/Update-Server-Lookup-table-bb1ae14f
    http://gallery.technet.microsoft.com/scriptcenter/Create-Server-2010-2013-19bd3cc7
    http://gallery.technet.microsoft.com/scriptcenter/Bulk-create-Server-Sites-784f7b29
    These wont do what you need but will give you an idea of using the PSI in PowerShell
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Setting IIS W3C Extended Log File settings via command line, registry or configuration file

    I am currently in need of a way to set IIS W3C Extended Log File settings via command line, registry or configuration file.  More specifically the 'Bytes Sent (sc-bytes)' and 'Bytes Received (cs-bytes)' settings that are not enabled by default. 
    If anyone knows where I can locate these setting (outside of the GUI) for all IIS versions that would be greatly appreciated.

    I believe I have found a valid solution. You must have the WebAdministration module loaded.  I hope this helps someone.
    Use the following syntax to view current W3C fields:
    Get-WebConfiguration -filter system.applicationhost/sites/sitedefaults/logfile | select-object -expandProperty logExtFileFlags
    Use the following syntax to set W3C fields:
    Set-WebConfigurationProperty -Filter System.Applicationhost/Sites/SiteDefaults/logfile -Name LogExtFileFlags -Value "Date,Time,ClientIP,UserName,SiteName,ComputerName,ServerIP,Method,UriStem,UriQuery,HttpStatus,Win32Status,BytesSent,BytesRecv,TimeTaken,ServerPort,UserAgent,Cookie,Referer,ProtocolVersion,Host,HttpSubStatus"}

  • 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)

Maybe you are looking for