August 25, 2012 2:06 AM
Posted by: Richard Siddaway
Network,
PowerShell 3,
Windows 8,
WMIWindows 8 brings PowerShell v3 and a whole bunch of PowerShell modules. One such module is NETTCPIP and as the name suggests is about networking.
PowerShell v3 automatically loads modules for you so as soon as PowerShell opens try
PS> Get-NetIPConfiguration
InterfaceAlias : Ethernet
InterfaceIndex : 13
InterfaceDescription : NVIDIA nForce 10/100/1000 Mbps Ethernet
NetProfile.Name : Unidentified network
IPv4Address : 10.10.54.202
IPv6DefaultGateway :
IPv4DefaultGateway :
DNSServer : fec0:0:0:ffff::1
fec0:0:0:ffff::2
fec0:0:0:ffff::3
InterfaceAlias : WiFi
InterfaceIndex : 12
InterfaceDescription : Qualcomm Atheros AR5007 802.11b/g WiFi Ada
NetProfile.Name : TiscaliF23E11
IPv4Address : 192.168.1.2
IPv6DefaultGateway :
IPv4DefaultGateway : 192.168.1.1
DNSServer : 192.168.1.1
InterfaceAlias : Bluetooth Network Connection
InterfaceIndex : 30
InterfaceDescription : Bluetooth Device (Personal Area Network)
NetAdapter.Status : Disconnected
One thing that you will need to do is to set up PowerShell remoting
PS> Enable-PSRemoting
WinRM Quick Configuration
Running command "Set-WSManQuickConfig" to enable remote management of this computer by using the Windows Remote
Management (WinRM) service.
This includes:
1. Starting or restarting (if already started) the WinRM service
2. Setting the WinRM service startup type to Automatic
3. Creating a listener to accept requests on any IP address
4. Enabling Windows Firewall inbound rule exceptions for WS-Management traffic (for http only).
Do you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): a
Set-WSManQuickConfig : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859113"
Machine="localhost"><f:Message><f:ProviderFault provider="Config provider"
path="%systemroot%\system32\WsmSvc.dll"><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault"
Code="2150859113" Machine="RSLAPTOP01"><f:Message>WinRM firewall exception will not work since one of the network
connection types on this machine is set to Public. Change the network connection type to either Domain or Private and
try again. </f:Message></f:WSManFault></f:ProviderFault></f:Message></f:WSManFault>
At line:69 char:17
+ Set-WSManQuickConfig -force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException
+ FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand
The emphasis of Public is mine. We have a network connection type set to public. At this point I would normally be tearing my hair out because network connection types are the ultimate pain to modify. I have hated the things since Windows Vista. No more they are now a minor inconvenience.
Look in the module NetConnection for Get-NetConnectionProfile
PS> Get-NetConnectionProfile
Name : Unidentified network
InterfaceAlias : Ethernet
InterfaceIndex : 13
NetworkCategory : Public
IPv4Connectivity : NoTraffic
IPv6Connectivity : NoTraffic
Name : TiscaliF23E11
InterfaceAlias : WiFi
InterfaceIndex : 12
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic
Now we can get to it modifying is easy
PS> Set-NetConnectionProfile -InterfaceIndex 13 -NetworkCategory Private
PS> Get-NetConnectionProfile
Name : Unidentified network
InterfaceAlias : Ethernet
InterfaceIndex : 13
NetworkCategory : Private
IPv4Connectivity : NoTraffic
IPv6Connectivity : NoTraffic
Name : TiscaliF23E11
InterfaceAlias : WiFi
InterfaceIndex : 12
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic
And now you can enable PowerShell remoting
Best of all the change is WMI based. The netconnection cmdlets are created as CDXML from WMI classes new to Windows 8. Get-NetIPConfiguration is also CDXML.
CDXML is cmdlets over objects – WMI classes wrapped in XML and presented as a module
see Chapters 18 & 19 of PowerShell and WMI for more details
August 21, 2012 2:09 PM
Posted by: Richard Siddaway
Windows 8I’ve upgraded two machines to Windows 8
The first is my main working laptop:
- Windows 8 Enterprise can’t do an in place upgrade of Windows 7 Ultimate. So had to re-install all my applications. Took the opportunity to upgrade to Office 2013 and Visual Studio 2012
- Following installed and work:
- Adobe Digital Editions
- Camtasia
- Snaggit
- Live mail 2012
- Palm eReader
- Skype
- Magic Disk is no longer required because Windows 8 can mount .iso files in the file system. Right click an .iso file in File Explorer and Mount is the first choice on the context menu
- Windows defender now does Anti-Virus
The second machine was my Dell Duo:
- Installed windows 8 as an upgrade to Windows 7 Home premium
- Kindle for PCs doesn’t work on Windows 8. Download the free Kindle app from the Microsoft store. Its not obvious where the downloaded books are stored
- The DUO is a hybrid netbook/tablet. The accelerometer stopped working post upgrade meaning the screen didn’t rotate. Not good for a tablet. Dell don’t appear to do an updated driver but a web search found the issue was fixable using the Samsung driver from http://www.samsung.com/global/windowspreview/
- Running as a tablet swipe & touch all seem to work OK
One draw back to the Kindle app is that it only seems able to access ebooks through the Amazon store. With Kindle for windows PC I could add books in from other sources. Stopping this is a backward step. Luckily I have other means of reading those ebooks
August 19, 2012 2:38 AM
Posted by: Richard Siddaway
PowerShell 3Downloaded and installed PowerShell v3 and its associated new operating system (Windows 8) from MSDN in the week.
One nice new cmdlet is Unblock-File.
Download a bunch of files from the Internet and you have to unblock them. Its now this easy
Get-ChildItem -Filter *.d* | Unblock-File
July 12, 2012 12:21 PM
Posted by: Richard Siddaway
SecurityWould you like a copy of PowerShell in Depth signed by the authors plus a DVD narrated by the authors demoing many of the concepts in the booK? Oh and the book is signed by all three authors and is parted of a limited edition?
You would?
Then visit
http://store.concentratedtech.com/indepth.php
Soon.
Its a limited one off offer & when they’re gone – they’re gone
July 11, 2012 12:28 PM
Posted by: Richard Siddaway
Security
When: Tuesday, Jul 31, 2012 7:30 PM (BST)
Where: Virtual
*~*~*~*~*~*~*~*~*~*
Workflow is one of the big new features in PowerShell v3. This session introduces how it works and some of the quirks associated with this new technology
Notes
Richard Siddaway has invited you to attend an online meeting using Live Meeting.
Join the meeting.
Audio Information
Computer Audio
To use computer audio, you need speakers and microphone, or a headset.
First Time Users:
To save time before the meeting, check your system to make sure it is ready to use Microsoft Office Live Meeting.
Troubleshooting
Unable to join the meeting? Follow these steps:
- Copy this address and paste it into your web browser:
https://www.livemeeting.com/cc/usergroups/join
- Copy and paste the required information:
Meeting ID: 25FWNB
Entry Code: m#@)”)~3M
Location: https://www.livemeeting.com/cc/usergroups
If you still cannot enter the meeting, contact support
Notice
Microsoft Office Live Meeting can be used to record meetings. By participating in this meeting, you agree that your communications may be monitored or recorded at any time during the meeting.