Has anyone tried installing powershell on a Windows 2000 server? I realize its not supposed to be installed on windows 2000 server and therefore not supported; however the vbscript that runs on it takes 3.5 days to complete which powershell could probably finish in lesser time. Nevertheless, I noticed it just requires .NET 2.0 to run.
If you have administrator access to the Windows 2000 server in question, you could run PowerShell on a supported machine in the same domain and use set-location to change your working directory to the remote server
You could then run whatever PowerShell script you want on the remote directory. If the folder you are starting in is shared, it is even simpler (you won't need to access the admin share). Or you could map a drive on your machine with PowerShell that links to the target directory.
I don't want to have to go to the Microsoft Store page, start fiddler, start the download, capture the .appx file URL and then manually download it so that I can use Add-AppxPackage.(See how Windows OS Hub did that here)
You can now use winget to install msstore apps on windows 10 and 11.Use winget search --source=msstore to make a search, and use the id of the app to install and upgrade the app.For example, to install Netflix:
store.rg-adguard.net is a GUI for generating direct download links to store apps. Peeking at the source of that page, we can piggyback off them to download the content directly, but using PackageFamilyName, rather than Name (in your example it would be Microsoft.HEVCVideoExtension_8wekyb3d8bbwe).
This correctly downloads neutral and x64 packages but untested for arm and 32bit systems. the path must point to a folder. It will download the package and its dependencies and save them all as their original file names while avoiding name collisions like chrome.
I am trying to do a Phoenix LiveView project to learn how it works. To this extent, I have, in my windows 10 machine, installed Elixir and NPM via chocolatey. I have also successfully run the commands:
The New-Service powershell cmdlet is used by the script to create the winlogbeat service. You could try to install Powershell 2.0 and see if the script works. Microsoft's website doesn't have much information on Powershell 2.0 so I don't know if New-Service is present in the version.
With PowerShell, there is an additional step. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.
The command for installing with PowerShell at the top of the page works for all versions of PowerShell from v2 on. This is provided as an additional note for folks who want a more terse command that is easier to remember.
With PowerShell, there is an additional step or two. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.
With completely offline use of Chocolatey, you want to ensure you remove the default community package source (choco source list followed by choco source remove --name chocolatey, or however you would do that with a configuration manager like Puppet).
If you prefer to have the install.ps1 file already, comment out the download line in the batch file and download the install.ps1 from community.chocolatey.org and save it as install.ps1 next to the installChocolatey.cmd file.
Run installChocolatey.cmd from an elevated cmd.exe command prompt and it will install the latest version of Chocolatey. You can not run this from powershell.exe without making changes to your execution policy.
When you have Visual Studio 2010+ and the NuGet extension installed (pre-installed on any newer versions of Visual Studio), you can simply type the following three commands and you will have Chocolatey installed on your machine.
This will not set Chocolatey as an installed package, so it may be a good idea to also call choco upgrade chocolatey -y and let it reinstall the same version, but at least it will be available for upgrades then.
There is one really important consideration when installing Chocolatey to a non-default location: Chocolatey only locks down the permissions to Admins when installed to the default location %PROGRAMDATA%\Chocolatey, which means the same thing as %SystemDrive%\ProgramData\Chocolatey.
If you are installing to another location, you will need to handle this yourself, i.e. restrict write access to Admins in case you so desire.This is due to alternative locations could have a range of permissions that should not be changed.See Why does Chocolatey install where it does and GitHub Issue 398 for more details.
If your server is restricted to TLS 1.1+, you need to add additional logic to be able to download and install Chocolatey (this is not necessary when running Chocolatey normally as it does this automatically).
This option should be a last resort and is considered to be a more advanced scenario - most things you do on Windows require administrative rights, especially surrounding software management, so you are going to be limited even in packages you attempt to install. If you are using the community package repository, there are over 200 packages you can install from the community repository without administrative permission - see =id%3Aportable+tag%3Aportable.
Once installed, Chocolatey can be upgraded in exactly the same way as any other package that has been installed using Chocolatey. Simply use the command to upgrade to the latest stable release of Chocolatey:
I am trying to build a PowerShell script to install the Grafana agent on windows in a custom path and not in C drive. However I am not able to change the installation path since I do not which parameter do I need to pass and it is also not mentioned on the documentation.
Well I am not a Windows user so unfortunately cannot help much but I will suggest to just for it on the Internet and I think you will find the correct syntax to change the directory (I know these questions are v.commonly asked on websites e.g. stackoverflow etc).
Here's an oldie but goodie, that keeps coming up for me rather frequently. I've been working with IIS on Windows for a loooong time and I have a number of products that go way back that run on IIS. As a result I deal with a lot of support issues around IIS and people who install IIS run an application for years, have their servers eventually break down and then have to reinstall years after their last install. And a lot of times the people who set up the system are long gone.
The chief complaints I hear frequently is that it's a pain to get IIS to install initially with all the right components. I tend to agree - especially on Server versions installing IIS through the insanely user hostile Server Manager interface is a pain.
Apparently many people are unaware that in recent versions of Windows - using Powershell - you can automate the IIS Features installation using a few simple Powershell Commandlet calls. It's as easy as creating a small PowerShell script file and letting her rip.
You can use the Enable-WindowsOptionalFeature command to install IIS Features as well as any other Windows Features. This command works both on desktop and server versions (server versions also have Enable-WindowsFeature which has the same effect) and makes it pretty easy to automate an IIS install by whittling away a few commands in a Powershell script file.
Two more features that I typically use on IIS and aren't directly includable features are WebDeploy and UrlRewrite. You can install those from the Web Platform installer, or - which is easier in my case - from Chocolatey:
For bonus points, lets also create an Application Pools and attach a Web site/Virtual to it. You can configure IIS via more powershell helpers by using the WebAdministration powershell module (most like already installed):
There are obviously a lot more options you can set on these components, but it's easy to find out about those. I also recommend that while you're discovering features, use the PowerShell ISE shell (run from the Start menu using Run as Administrator) to discover what's available:
The Intellisense in the editor and the command window gives you live property values on commands and even live objects as shown in the Figure 1 which makes it relatively easy to figure out settings. For the rest the various cmd-lets and admin objects are well documented and searchable.
None of this is new of course, but it's always good to be reminded that you can automate installation and configuration of IIS relatively easily. This is especially true since I just this week I heard from several people how much of a pain IIS can be to install and get up and running. It doesn't have to be this way... the tools are there.
Very useful Rick! For some reason IIS does not come as standard with the very useful feature to import an application as a ZIP file and Microsoft make it super hard to find the link to download that add-on. It forces you to first install the "Web Platform Platform Installer Platform" or something, and then find an obscure link. I'm guessing that can't be done from PowerShell, but it sure would be useful.
Web Deploy can be downloaded without WebPI ( -and-migrate). While it is possible to use PowerShell (or any other scripting toy, or msiexec) to get the bits installed, the installer's user interface is the only documented way to fully customize the setup.
This looks good, Rick. I ended up doing something similar with Desired State Configuration (DSC) to configure IIS the way that I wanted. -us/powershell/dsc/windowsfeatureresource This simplifies the re-running of my configuration script, but doesn't always provide the level of granularity that I need. I combined it with non-DSC PowerShell that manually checks to see if things are already configured, and now have a re-runnable script that I can run on my "pet" servers. Maybe this will become less important once I start treating my servers more like cattle, and stand up new ones every deployment.
64591212e2