ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Tags
    3. powershell
    Log in to post
    • All categories
    • OksanaO

      Getting started with PowerShell and VMware vSphere

      Watching Ignoring Scheduled Pinned Locked Moved Starwind powecli esxi vcenter starwind blog powershell esxi host vsphere
      1
      3 Votes
      1 Posts
      826 Views
      No one has replied
    • OksanaO

      Using Powershell for Hyper-V VMs Automatic Deployment in Windows Server 2016

      Watching Ignoring Scheduled Pinned Locked Moved Starwind powershell starwind blog windows server 2016 windows server hyper-v hyper-v vm vm deployment
      2
      6 Votes
      2 Posts
      2k Views
      jmooreJ

      good article thanks and handy script

    • gjacobseG

      Understand CMD CLI to Powershell Variable

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion cmd cmdlet ps powershell chocolatey batch script scripting
      2
      0 Votes
      2 Posts
      1k Views
      dbeatoD

      @gjacobse So basically you want to iterate through a list of computers the same script correct? So do you have a list of computers? What are other steps on your script? because what we can do is the following

      *$computers = import-csv -Path "c:\script\computers.csv" foreach ($oldname in $computers){ Rename-Computer -NewName $newname -DomainCredential domain\admin -Restart}

      This assumes you have a CSV file with a oldname and new name columns with computer names.

    • hobbit666H

      Powershell - Logoff disconnected sessions

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell scripting rdp sessions
      4
      2 Votes
      4 Posts
      2k Views
      hobbit666H

      not having much luck...... It's Friday so giving up till Monday/Tuesday 🙂

    • gjacobseG

      Powershell - Count AD users

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell count ad
      13
      2 Votes
      13 Posts
      3k Views
      J

      You can try the following command:

      (get-aduser -filter *).count

      For only Enabled User Accounts
      (get-aduser -filter *|where {$_.enabled -eq "True"}).count

      For only Disabled User Accounts
      (get-aduser -filter *|where {$_.enabled -ne "False"}).count

    • OksanaO

      Installing Exchange Server 2016 on Windows Server 2016 with GUI

      Watching Ignoring Scheduled Pinned Locked Moved Starwind exchange server 2016 windows server 2016 powershell graphical user interface gui starwind blog outlook
      1
      2 Votes
      1 Posts
      1k Views
      No one has replied
    • gjacobseG

      ADUC: Clear 'dead' computers

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion ad active directory aduc computers powershell
      13
      2 Votes
      13 Posts
      2k Views
      dbeatoD

      Another example taken from another script:

      import-module activedirectory $domain = "domain.mydom.com" $DaysInactive = 90 $time = (Get-Date).Adddays(-($DaysInactive)) # Get all AD computers with lastLogonTimestamp less than our time Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -Properties LastLogonTimeStamp | # Output hostname and lastLogonTimestamp into CSV select-object Name,@{Name="Stamp"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp)}} | export-csv OLD_Computer.csv -notypeinformation
    • DashrenderD

      Learning Powershell step one - enable remote access

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell remote access
      3
      0 Votes
      3 Posts
      3k Views
      DashrenderD
      ListeningOn = ::1, fe80::ad99:8e4d:c356:9939%5, fe80::c0a1:571b:2955:87be%7, fe80::cda4:4841:5bff:7b5c%8, fe80::f902:5ea5:2d74:a154%3

      Interesting - the server is only listening on IPv6 addresses.

      Turns out IPvX filters are for the addresses that are listening (i.e. the local IP on the machine you are trying to remote into).
      I set a filter like this 10.0.0.1-10.0.5.254 (where my admin machines would live).
      Unfortunately, since this isn't an incoming filter (that's the firewall's job) this filter wasn't large enough to cover all of my production networks. I had 10.1.0.1-10.1.0.254 that wasn't inside the above range, and of course keep the machine from listening on it's IPv4 (the IPv6 was listening because I just left it wide open - testing, not using IPv6 in general, so left it as default (*))

      So tweaking my filter to 10.0.0.1-10.0.5.254, 10.1.0.1-10.1.0.254 solved my problem.

    • GreyG

      Powershell: I got something wrong.

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      17
      0 Votes
      17 Posts
      2k Views
      JaredBuschJ

      @grey said in Powershell: I got something wrong.:

      @jaredbusch said in Powershell: I got something wrong.:

      @grey Specify PasswordLastSet after the -and also otherwise it has no idea what you are trying to -lt.

      Get-ADUser -filter {PasswordNeverExpires -eq $false -and (PasswordLastSet -gt "8/16/2017" -and PasswordLastSet -lt "8/21/2017") -and enabled -eq $true} -Properties PasswordLastSet,Name,Description

      You win at the Internet today. I should have caught that.

      I did enough time in development. I know how it goes.

    • OksanaO

      Configuring Windows Server 2016 Core. Part 2: Hyper-V role installation

      Watching Ignoring Scheduled Pinned Locked Moved Starwind hyper-v role powershell hyper-v manager windows server virtual network starwind blog
      7
      2 Votes
      7 Posts
      2k Views
      DashrenderD

      @darek-hamann said in Configuring Windows Server 2016 Core. Part 2: Hyper-V role installation:

      @dashrender

      This is actually a great article! It simplifies the procedure of installing a Hyper-V role from a GUI free Windows 2016 Core setup.

      That's nice, but again - WHY. This is not the way you should NORMALLY install Hyper-V because now you have a license tied to the hardware. I get that there are reasons, but I'm asking what they are.

    • S

      Need help with powershell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      11
      2 Votes
      11 Posts
      2k Views
      dafyreD

      @stess said in Need help with powershell:

      @dafyre said in Need help with powershell:

      @stess said in Need help with powershell:

      @dafyre said in Need help with powershell:

      GitHub link: https://github.com/dafyre/PoweshellScripts/blob/master/folderInheritance.ps1

      <# .SYNOPSIS File / Folder Auditing script to determine which users have permissions that are *NOT* inherited. .DESCRIPTION Date UpdatedBy Details 08/10/2017 BW Initial coding. #> $path="C:\TEMP" $outFile="myFolderInheritance.csv" $nonInherited=new-object System.Collections.ArrayList $folders=dir $path -Directory -recurse|get-acl| select @{Label='Path';Expression={$_.PSPath.replace("Microsoft.PowerShell.Core\FileSystem::","")}}, @{Label='User';Expression={$_.Access.identityReference}}, @{Label='IsInherited';Expression={$_.Access.IsInherited}}| where {$_.IsInherited -eq $false} foreach ($item in $folders) { $pass=0 write-host "Checking folder $($item.path)" foreach ($user in $item.user) { #$x=$nonInherited "$($item.Path), $($user),$($item.IsInherited[$pass])" $x=$noninherited.add("$($item.Path), $($user),$($item.IsInherited[$pass])") $pass=$pass++ } } $nonInherited|out-file -FilePath $outFile write-host "Done."

      These works to certain extend of what I am looking for, but it needs some tweaking to work the way I am expecting the result.
      Thanks!

      How are you wanting the result to look?

      The script doesn't appear to be showing false on non-inheritance. There either True or False for every member of the folder regardless of their inheritance.

      I am looking into this post right now as it was brought up in Spiceworks.
      It shows the result I am hoping for where non-inheritance = false and inherited = true.

      Ah, okay. I thought you wanted to only see the ones where Inherited=False...

      So you want to see everything, and whether or not it is inherited?

      Edit: Also for the CSV File generated, the layout is

      Folder, User, Is Inherited

      Is Inhertied is True or False.

    • NetworkNerdN

      Hytrust Configuration Backups with Powershell REST API Calls

      Watching Ignoring Scheduled Pinned Locked Moved Self Promotion networknerd blog networknerd hytrust hytrust encryption powershell api scripting networknerd powershell rest api disaster recovery vm encryption vmware networknerd vmware
      1
      2 Votes
      1 Posts
      1k Views
      No one has replied
    • wrx7mW

      [Solved] Bat File Uploading CSV via FTP - Works from Server 2008 R2, 0KB File on FTP from 2012 R2

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion ftp powershell windows server 2012 r2 windows server 2008 r2
      2
      2 Votes
      2 Posts
      1k Views
      wrx7mW

      I ended up going with an upgraded script by truly using powershell.

      I found the answer here -
      https://stackoverflow.com/questions/936108/how-to-script-ftp-upload-and-download

      Essentially this is the script:

      $File = "D:\Dev\somefilename.zip"
      $ftp = "ftp://username:[email protected]/pub/incoming/somefilename.zip"

      "ftp url: $ftp"

      $webclient = New-Object System.Net.WebClient
      $uri = New-Object System.Uri($ftp)

      "Uploading $File..."

      $webclient.UploadFile($uri, $File)

    • GreyG

      Powershell: Get-OldComputers (and disable them)

      Watching Ignoring Scheduled Pinned Locked Moved Developer Discussion powershell active directory pruning
      2
      3 Votes
      2 Posts
      900 Views
      GreyG
      Import-Module activedirectory $target = Get-ADOrganizationalUnit -Identity "OU=Disabled Computer Accounts,OU=Space,DC=Domain,DC=com" $computers = Get-ADComputer -filter {(enabled -eq "false")} foreach ($name in $computers) { Move-ADObject $name -TargetPath $target -verbose }

      Followup to above... this section would move the disabled computers to a 'disabled' OU.

    • RomoR

      Accessing and enabling Powershell Remoting in a workgroup environment

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion enable-psremoting psremoting powershell powershell remoting windows server windows
      3
      5 Votes
      3 Posts
      2k Views
      black3dynamiteB

      In case you have a mix of private and public network profiles use this command.

      Enable-PSRemoting -SkipNetworkProfileCheck - Force

      SkipNetworkProfileCheck ignores any public network profiles so you can enable remote powershell successfully.

    • RomoR

      Downloading and installing Starwind VSAN v8 on Hyper-V Server 2016 via powershell

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell hyper-v server 2016 hyper-v 2016 starwind
      2
      6 Votes
      2 Posts
      2k Views
      D

      Since i've previously attempted on testing the VTL to Cloud Replicator, I would like to mention that there can be a possible error in the process. Just so noone rings the alarm beforehand, it's quite simple to overcome the "Setup failed to install Microsoft .NET Core. Error 3010" by either rebooting the node, or installing the .NET core before installing StarWind.

      After getting in touch with them, I was actually surprised that they were kind enough to take that into account in one of their future releases and mention to have that fixed.

    • wirestyle22W

      Powershell Book Recommendations

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion powershell
      10
      3 Votes
      10 Posts
      1k Views
      dafyreD

      @BRRABill said in Powershell Book Recommendations:

      @dafyre said in Powershell Book Recommendations:

      @BRRABill said in Powershell Book Recommendations:

      @dafyre said in Powershell Book Recommendations:

      @wirestyle22 said in Powershell Book Recommendations:

      @dafyre said in Powershell Book Recommendations:

      That is an excellent book. That's how I got started with PS about a year ago.

      first or second link?

      Second link. The Month of PowerShell lunches. That's pretty good.

      How long of a lunch do you get?

      However long I need, lol. Usually ~45 mins or an hour.

      Yeah, that was kind of a joke, referring to the title of the book.

      /facedesk.

      I now have two brain cells left for the day.

    • OksanaO

      Intraforest migration in Windows Server 2016 using Active Directory Migration Tool v3.2

      Watching Ignoring Scheduled Pinned Locked Moved Starwind windows server active directory domain admt active directory migration tool vbscript powershell admt snap-in intraforest migration migration
      1
      1 Votes
      1 Posts
      2k Views
      No one has replied
    • scottalanmillerS

      Keith Baldwin on Intro to PowerShell at Mango Meetup DFW

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion keith baldwin mango meetup mango meetup dfw powershell presentation youtube
      2
      2 Votes
      2 Posts
      794 Views
      scottalanmillerS

      Thanks to @NerdyDad for this presentation at Mango Meetup DFW

    • RomoR

      Powershell - Enabling MPIO and Failover Clustering on Hyper-V Server 2016

      Watching Ignoring Scheduled Pinned Locked Moved IT Discussion howto hyper-v server 2016 starwind vsan hyperconvergence mpio failover-clustering powershell
      2
      3 Votes
      2 Posts
      3k Views
      RomoR

      Configuring MPIO to automatically claim all iSCSI devices

      Enable-MSDSMAutomaticClaim -BusType iSCSI
      0_1494445991062_mpio-iscsi.png
    • 1
    • 2
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 8 / 11