• Can you imagine how long it would take to generate a list of VMs across hundreds of subscriptions on Azure? It would take ages not only to create a list of resources but also to find a single resource in a massive environment. As we know, Azure Portal only lists the first 1000 subscriptions, and it is not really convenient to query resources using the portal when you have a lot of subscriptions. Fortunately, we've got the option to query resources in a much faster and more dynamic way. In this post, we will cover Azure Resource Graph and use it with PowerShell for even more flexible query management.

  • @Ken - You should be able to relatively easily - however, you'd have to download it first, since you can't get the file properties until you download it. You could download it to a temp location, grab the LastWriteTime stamp and parse it to create your new name.

    @Sumit - You have a similar situation. Download your file to a temporary location, and then copy/rename it with a timestamp in the name, and then you'll keep a running list. You'll also need to manage the old copies so you don't fill up your disk. 🙂

    David F.

  • Hi,

    Thanks for this. I plan to use this along with task scheduler to download a fresh file every week. However, the new file overwrites the older one. Is there a way to preserve the older file as well?


  • In this beginner's guide, you will learn how to rename files with PowerShell. I will demonstrate how to list files with the Get-ChildItem cmdlet, and then I will discuss a few examples of renaming files with the Rename-Item cmdlet.

  • Add " | Out-File -FilePath C:tempmyfilename.csv" to the end of the command

  • Not to be judgemental, but this article is misleading - You show the installation of VMWare pyVmomi, but the rest of the article has zero relevance to that, it using is standard SSH, rather that the features exposed by VMWare Rest API.

  • Thank you David for taking the time out to respond. I'll give it a try

  • You just need to use -include to include only those directories. But, if you have the possibility of directory names and file names being very similar to each other, you can expand this and get the list of directories to check, and then go through them.

    So, for example you could do something like this:

    get-childitem -path c:topdir -recurse -directory -include test* | foreach-object { 
        get-childitem -path $_ -file | Select-Object -first 10 @{Name="Gigabytes";Expression={[Math]::round($_.length / 1GB, 2)}}

    You'd obviously want to massage it a lot more to get exactly what you want.. but that gives you the basis for what you're looking for.

    David F.

  • Another vote for more info on the PowerBI assistance.

  • How do we exclude gci to try to read certain subfolders? Seems like it goes through them all

  • Use VSCode now (in 2021). Very simple. ISE is dead these days. Times change.
    And it's not a big deal, ISE still works, for version 5.1. There exist just better tools, e.a. the VSCode extension.

    Others apparantly complain that Microsoft doesn't upgrade ISE anymore or "pushes" people towards VSCode.
    But VSCode is an amazing tool and it's open source.

    Personally, as a developer, I was already using VSCode for multiple code editing tasks before, after I started learning PowerShell I started searching for more VSCode extensions later and decided that I wanted a PowerShell plugin as well, so I choose it and noticed that worked very well. So I don't feel being pushed anyway.

    Actually I feel more "pushed" by the fact that the PowerShell plugin wants you to change the theme back to a ISE style, while I am just happy with the dark theme that VSCode has.

  • I have been suffering from neighbors keep hacking our dell notebooks and network and i start fear they hack any online purchases or accounts plus no privacy they even magify screens even when my daughters studding doing her assignments online
    I don't know what is the issue no matter disable WPS change all password continues and use complex ones for page and connection all did not work use monitor and keep ending process disable remote stuff in fire wall some how they still could log in and even when i disable phone option i don't use i find it again in process
    i reach to article when i was trying to know was certain process risk or not and i am happy i reach here thank you a lot for haring
    just small thing
    i could not execute below denied though i am admin i have single account and i notice though i am the admin some things i try to ends denied and some options not there for me to edit on is this related to central net in country or net company or this because hikers managed to disable some options for me and took control?

    Set-ItemProperty -Path HKLM:SOFTWAREMicrosoftWindowsCurrentVersionpoliciessystem -Name LocalAccountTokenFilterPolicy -Value 0

    why power shell needed in general away from remote excucution

  • Your screenshots are not really helpful because it all in French. I highly recommend to work only in English as an IT pro. This allows you to search for error messages and communicate with other IT pros on the net.

    You can try to run get-module, to see if the module has been loaded in your remote session.

    Perhaps the module does not work in remote sessions. I recommend contacting the developer.


  • I Michael. Thank you for your help.

    I Execute the install-Module PSWindowsUpdate with -Verbose option on both machine. So I suppose the module is installed and loaded. I have also execute Get-WUList command with -Verbose and the result so weird :

    It seems the command is lauched well but cannot have access to the availables updates. What do you think ?


  • Indeed a great guide. thank you.

  • I think the interesting question is not if it is installed, but it if it loaded into your remote session.

  • Load More
© 4sysops 2006 - 2021


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account