Jump to content

HØLLØW

Member
  • Posts

    137
  • Joined

  • Donations

    0.00 USD 
  • Country

    Germany

Posts posted by HØLLØW

  1. Ok thank you guys!

    It works fine for now - But I tried to modify the script to get it working with multiple files, no chance for me...

    So is it possible to get it working with more than 2 files?

    In my case there are 3 scenarios I need this:

    1. 4 files to "connect" together
    2. 5 files to "connect" together
    3. 6 files to "connect" together

    The output should be the same as described in this topic.

    Thank you!!!

  2. Hey Guys,

    just a short question:

    In my Windows Server 2012 configuration-script, I set the following two options:

    bcdedit /set {current} bootlog yes

    bcdedit /set {current} sos on

    Both options are then enabled in the "msconfig" screen.

    Also, the "bootlog" works fine - The logfile is written to "C:\Windows\ntbtlog.txt".

    But the problem is, that the "sos" option which should show the drivers loaded during startup / boot are not shown on the screen...

    Any ideas?

    Thank you

  3. Hi again :-)

    Thank you - Now I got it and it's working very well.

    Just one thing:

    I modified your script to

    select -skip 4

    So I get a very clean list of just the cluster names - Is it possible to also skip the last line (because it's empty)?

    EDIT:

    Sorry,

    I checked my script again and noticed that the last line is an empty line that Powershell doesn't count!?

    I' running the following command to get the total line numbers:

    $linecount = (Get-Content $getclusterlog_clean).Count
    write-host $linecount

    This gives me the number "63" - If I open "$getclusterlog_clean" there are 64 lines (the last one is empty as I said before).

    So how can I remove this empty line at the end of my logfile? - I think there will be a solution to remove all empty lines without counting te total line numbers before!?

  4. Hi CoffeeFiend,

    thanks for your reply - I'm not sure if I explained my problem detailed enough...

    I need to fill a variable called "$vmcluster" with the names of the cluster - I think this should be done in a loop!?

    I want to run my defined function for every cluster in the list:

    function disableesxhostmonitoring {
    # Disable the Cluster-Option "Host Monitoring"
    $spec = New-Object VMware.Vim.ClusterConfigSpecEx
    $spec.dasConfig = New-Object VMware.Vim.ClusterDasConfigInfo
    $spec.dasConfig.hostMonitoring = "disabled"
    $_this = Get-Cluster $vmcluster | Get-View
    $_this.ReconfigureComputeResource_Task($spec, $true)
    }

  5. Hey Guys,

    I'm working with Powershell for a few days now - It's totally new to me (I know you already heard that so many times before... :-)).

    I already have the base of my script - But now I have to do the following:

    I have a text-file / logfile that looks like this (as you can see - I'm using PowerCLI from VMware, but I think this is a general Powershell question :-)):


    Name HAEnabled HAFailover DrsEnabled DrsAutomationLevel
    Level
    ---- --------- ---------- ---------- ------------------
    cluster1 True 1 True FullyAutomated
    cluster2 True 1 False FullyAutomated
    cluster3 False 1 False FullyAutomated
    123442 True 1 False FullyAutomated
    server23 True 0 False FullyAutomated
    test123 False 1 False FullyAutomated
    abcd False 1 False FullyAutomated

    I think we have to cut off all the lines which are not necessary for the script?! - This will be the first 5 lines of the logfile and the stuff behind the cluster-names.

    The next step will be to fill up a variable with the names of the clusters (in the first column) - I think this must be done in a loop?!

    The script should be flexible so I will run a special command for each server / cluster:

    function disableesxhostmonitoring {
    # Disable the Cluster-Option "Host Monitoring"
    $spec = New-Object VMware.Vim.ClusterConfigSpecEx
    $spec.dasConfig = New-Object VMware.Vim.ClusterDasConfigInfo
    $spec.dasConfig.hostMonitoring = "disabled"
    $_this = Get-Cluster $vmcluster | Get-View
    $_this.ReconfigureComputeResource_Task($spec, $true)
    }

    I hope someone can help.

    Thanks

  6. Hey guys out there,

    I need help with the "REG QUERY" command :blink:

    I have to edit the following REG-Keys:

    "MouseSpeed"="0"
    "MouseThreshold1"="0"
    "MouseThreshold2"="0"

    The "Master-Key" is the following:

    HKEY_USERS\S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-500\Control Panel\Mouse

    The "problem" is, that the numbers I marked with "X" are changing on every new OS-Installation.

    So I have to use the "REG QUERY" command tho determine the REG-Key!

    For antoher operation with "REG QUERY" I'm using the following command:

    @FOR /F "DELIMS=" %%? IN ('REG QUERY HKLM\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318} /S^|FINDSTR \\Connection$') DO @REG ADD "%%?" /V ShowIcon /T REG_DWORD /D 1 /F >NUL

    But what about the syntax? I'm sorry but I don't understand it completely...

    So can anyone help me getting the right syntax for the operation I have to do?

    Thank you

  7. Hey ho,

    I also need a solution for a similar problem:

    I have a file with 610 lines of code. In exactly line 347 I have to add some characters between "><" :

    <DATA Type="xsd::string">%MYOWNCHARACTERS%</DATA>

    Can you give me the code I need for a batch-file to do this job?

    I'm not so familiar with the commands in batch to do this job, and know I have to study it B)

    Thank you very much

  8. Umm, regini? :)

    and just to clarify. Cluberti is not asking what regini is, he is saying that regini is included in W2K8-R2.

    Sorry, my mistake :blink:

    I tested it with the following:

    HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} [1]

    That's not working! Administrator has just read-access!

    Is there a way to change te owner of the key via commandline? Because then it's working fine :yes:

×
×
  • Create New...