by skufel | Sep 10, 2013 | Infrastructure, Network, Scripting, SysAdmin
If you need to identify your public IP and have no possibility to run web browser of any kind you can use telnet. In order to identify public IPv4: telnet v4address.com In order to identify public IPv6: telnet v6address.com Once connection is established autoresponder...
by skufel | Aug 13, 2013 | Scripting, Windows
Handy quick one to change script execution policy for PowerShell: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force Now all scripts should work fine 🙂
by skufel | Aug 7, 2013 | Directory Services, Infrastructure, Scripting, Windows
In order to create new Forest and promote Windows Server 2012 Core to be Domain Controller for that Forest, first Active Directory Services Role has to be added: Install-WindowsFeature AD-Domain-Services –IncludeManagementTools Once Active Directory DOmain Services...
by skufel | Jul 2, 2013 | Automation, Scripting, Windows
To download file from URL I used following piece of code: $fileURL = "http://server/file.zip" $fileName = "C:\Downloads\file.zip" $webclient = New-Object System.Net.WebClient...
by skufel | Jul 2, 2013 | Scripting, Windows
Recently I needed to unzip file from PowerShell script. Here is result what I did use to achieve that: $archiveDir = "C:\Downloads" $fileZip = $archiveDir + "\file.zip" $shell=new-object -com shell.application $zip = $shell.NameSpace($fileZip)...
by skufel | Jun 26, 2013 | Scripting, SysAdmin, Virtualization
After installing Windows Hyper-V 2012 sometimes there might be some issues with remote management (even if enabled via sconfig). In that case few firewall rules might have to be enabled on Hyper-V machine using PowerShell: enable-netfirewallrule -displaygroup...